File tree 5 files changed +14
-6
lines changed
5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 91
91
< div class ="l-data-visualization ">
92
92
< mct-include key ="'time-of-interest' "
93
93
class ="l-toi-holder show-val "
94
- ng-class ="{ pinned: pinned, 'val-to-left': toi.left > 80 } "
94
+ ng-class ="{ pinned: toi. pinned, 'val-to-left': toi.left > 80 } "
95
95
ng-style ="{'left': toi.left + '%'} "> </ mct-include >
96
96
</ div >
97
97
< a class ="l-page-button align-right s-icon-button icon-pointer-right "> </ a >
Original file line number Diff line number Diff line change @@ -58,9 +58,15 @@ define(
58
58
59
59
ConductorTOIController . prototype . setOffsetFromBounds = function ( bounds ) {
60
60
var toi = this . conductor . timeOfInterest ( ) ;
61
- var offset = toi - bounds . start ;
62
- var duration = bounds . end - bounds . start ;
63
- this . left = offset / duration * 100 ;
61
+ if ( toi !== undefined ) {
62
+ var offset = toi - bounds . start ;
63
+ var duration = bounds . end - bounds . start ;
64
+ this . left = offset / duration * 100 ;
65
+ this . pinned = true ;
66
+ } else {
67
+ this . left = 0 ;
68
+ this . pinned = false ;
69
+ }
64
70
} ;
65
71
66
72
ConductorTOIController . prototype . changeTimeOfInterest = function ( ) {
Original file line number Diff line number Diff line change 80
80
< mct-include key ="'time-of-interest' "
81
81
class ="l-toi-holder show-val "
82
82
ng-if ="toiPerc "
83
- ng-class ="{ 'val-to-left': toiPerc > 80 } "
83
+ ng-class ="{ 'pinned': toiPinned, ' val-to-left': toiPerc > 80 } "
84
84
ng-style ="{'left': toiPerc + '%'} "> </ mct-include >
85
85
86
86
< div class ="gl-plot-coords "
Original file line number Diff line number Diff line change @@ -252,8 +252,10 @@ define(
252
252
var bounds = conductor . bounds ( ) ;
253
253
var range = bounds . end - bounds . start ;
254
254
$scope . toiPerc = ( ( timeOfInterest - bounds . start ) / range ) * 100 ;
255
+ $scope . toiPinned = true ;
255
256
} else {
256
257
$scope . toiPerc = undefined ;
258
+ $scope . toiPinned = false ;
257
259
}
258
260
}
259
261
Original file line number Diff line number Diff line change @@ -545,7 +545,7 @@ define(
545
545
546
546
this . $scope . displayRows = this . filterAndSort ( newRows || [ ] ) ;
547
547
this . resize ( newRows ) . then ( this . setVisibleRows )
548
- . then ( this . timeout )
548
+ . then ( this . $ timeout)
549
549
. then ( function ( ) {
550
550
var timeOfInterest = this . conductor . timeOfInterest ( ) ;
551
551
if ( timeOfInterest ) {
You can’t perform that action at this time.
0 commit comments