-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
198 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
src/app/d3Bindings/eventDistribution/distributionVisualisation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/** | ||
* Created by Anthony. | ||
* | ||
* Intended to show the visualisation chosen by the other event distribution controls | ||
* A large visual surface of html elements, still controlled by d3 | ||
* | ||
*/ | ||
angular | ||
.module("bawApp.d3.eventDistribution.distributionVisualisation", []) | ||
.service( | ||
"DistributionVisualisation", | ||
[ | ||
"d3", | ||
function (d3) { | ||
return function DistributionVisualisation(target, data, dataFunctions) { | ||
// variables | ||
var that = this, | ||
container = d3.select(target), | ||
metaTrack = container.select(".metaTrack"), | ||
tiles = container.select(".imageTrack .tiles"), | ||
// 86400 seconds | ||
oneDay = 60 * 60 * 24, | ||
tileSizePixels = 60, | ||
tileSizeSeconds = 60 * 60, | ||
// seconds per pixel | ||
resolution = oneDay / resolution, | ||
// +1 so that 0.5 tile can fall off either end | ||
tileCount = (oneDay / tileSizeSeconds) + 1; | ||
|
||
// exports | ||
|
||
|
||
// init | ||
create(); | ||
|
||
// functions | ||
function create() { | ||
setDimensions(); | ||
|
||
updateAxis(); | ||
|
||
|
||
createElements(); | ||
|
||
} | ||
|
||
function setDimensions() { | ||
|
||
} | ||
|
||
function updateAxis() { | ||
|
||
} | ||
|
||
function createElements() { | ||
tiles.selectAll(".tile") | ||
.data(d3.range(tileCount)) | ||
.enter() | ||
.append("div") | ||
.style("top", 0) | ||
.style("left", function (d, i) { | ||
return (i * 60) + "px"; | ||
}) | ||
.style("width", tileSizePixels + "px") | ||
.attr("class", "tile"); | ||
} | ||
|
||
} | ||
} | ||
] | ||
).directive( | ||
"eventDistributionVisualisation", | ||
[ | ||
"conf.paths", | ||
"DistributionVisualisation", | ||
function (paths, DistributionVisualisation) { | ||
// directive definition object | ||
return { | ||
restrict: "EA", | ||
scope: false, | ||
controller: "distributionController", | ||
require: "^^eventDistribution", | ||
templateUrl: paths.site.files.d3Bindings.eventDistribution.distributionVisualisation, | ||
link: function ($scope, $element, attributes, controller, transcludeFunction) { | ||
var element = $element[0]; | ||
controller.visualisation = new DistributionVisualisation(element, [], {}); | ||
} | ||
} | ||
} | ||
] | ||
); |
16 changes: 16 additions & 0 deletions
16
src/app/d3Bindings/eventDistribution/distributionVisualisation.tpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
<div class="metaTrack"> | ||
meta data tracks | ||
</div> | ||
<div class="imageTrack"> | ||
false color spectrogram | ||
<div class="tiles"> | ||
<!-- there should be at most 25 tiles --> | ||
<div></div> | ||
</div> | ||
<div class="dayImageContainer"> | ||
<grid-lines configuration="gridConfig"></grid-lines> | ||
<img ng-src="assets/temp/eabad986-56d9-47b5-bec6-47458ffd3eae_101023-0000.ACI-ENT-EVN-trimmed-PLACEHOLDER.png" | ||
src=""/> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
angular.module("bawApp.d3.eventDistribution", [ | ||
"bawApp.d3.eventDistribution.distributionOverview", | ||
"bawApp.d3.eventDistribution.distributionDetail", | ||
"bawApp.d3.eventDistribution.distributionVisualisation", | ||
"bawApp.d3.eventDistribution.distributionController" | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters