Further TOI improvements

This commit is contained in:
Henry
2016-10-19 11:29:42 -07:00
parent 22564473b5
commit d12ae77d95
5 changed files with 14 additions and 6 deletions

View File

@ -91,7 +91,7 @@
<div class="l-data-visualization">
<mct-include key="'time-of-interest'"
class="l-toi-holder show-val"
ng-class="{ pinned: pinned, 'val-to-left': toi.left > 80 }"
ng-class="{ pinned: toi.pinned, 'val-to-left': toi.left > 80 }"
ng-style="{'left': toi.left + '%'}"></mct-include>
</div>
<a class="l-page-button align-right s-icon-button icon-pointer-right"></a>

View File

@ -58,9 +58,15 @@ define(
ConductorTOIController.prototype.setOffsetFromBounds = function (bounds) {
var toi = this.conductor.timeOfInterest();
var offset = toi - bounds.start;
var duration = bounds.end - bounds.start;
this.left = offset / duration * 100;
if (toi !== undefined) {
var offset = toi - bounds.start;
var duration = bounds.end - bounds.start;
this.left = offset / duration * 100;
this.pinned = true;
} else {
this.left = 0;
this.pinned = false;
}
};
ConductorTOIController.prototype.changeTimeOfInterest = function () {

View File

@ -80,7 +80,7 @@
<mct-include key="'time-of-interest'"
class="l-toi-holder show-val"
ng-if="toiPerc"
ng-class="{ 'val-to-left': toiPerc > 80 }"
ng-class="{ 'pinned': toiPinned, 'val-to-left': toiPerc > 80 }"
ng-style="{'left': toiPerc + '%'}"></mct-include>
<div class="gl-plot-coords"

View File

@ -252,8 +252,10 @@ define(
var bounds = conductor.bounds();
var range = bounds.end - bounds.start;
$scope.toiPerc = ((timeOfInterest - bounds.start) / range) * 100;
$scope.toiPinned = true;
} else {
$scope.toiPerc = undefined;
$scope.toiPinned = false;
}
}

View File

@ -545,7 +545,7 @@ define(
this.$scope.displayRows = this.filterAndSort(newRows || []);
this.resize(newRows).then(this.setVisibleRows)
.then(this.timeout)
.then(this.$timeout)
.then(function() {
var timeOfInterest = this.conductor.timeOfInterest();
if (timeOfInterest) {