Showing
1 changed file
with
7 additions
and
3 deletions
... | ... | @@ -106,10 +106,14 @@ export class TripAnimationComponent implements OnInit, AfterViewInit { |
106 | 106 | } |
107 | 107 | |
108 | 108 | timeUpdated(time: number) { |
109 | - const currentPosition = this.interpolatedData.map(dataSource => dataSource[time]); | |
109 | + this.minTime = moment(this.intervals[this.intervals.length - 1]).format('YYYY-MM-DD HH:mm:ss'); | |
110 | + this.maxTime = moment(this.intervals[0]).format('YYYY-MM-DD HH:mm:ss'); | |
111 | + const currentPosition = this.interpolatedData.map(dataSource => dataSource[time]).map(ds => { | |
112 | + ds.minTime = this.minTime; | |
113 | + ds.maxTime = this.maxTime; | |
114 | + return ds; | |
115 | + }); | |
110 | 116 | this.activeTrip = currentPosition[0]; |
111 | - this.minTime = moment(this.intervals[this.intervals.length - 1]).format('YYYY-MM-DD HH:mm:ss') | |
112 | - this.maxTime = moment(this.intervals[0]).format('YYYY-MM-DD HH:mm:ss') | |
113 | 117 | this.calcLabel(); |
114 | 118 | this.calcTooltip(); |
115 | 119 | if (this.mapWidget) { | ... | ... |