Browse Source

trip animation tooltip fix

pull/2797/head
Artem Halushko 6 years ago
parent
commit
24e04fea20
  1. 10
      ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts

10
ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts

@ -106,10 +106,14 @@ export class TripAnimationComponent implements OnInit, AfterViewInit {
} }
timeUpdated(time: number) { timeUpdated(time: number) {
const currentPosition = this.interpolatedData.map(dataSource => dataSource[time]); this.minTime = moment(this.intervals[this.intervals.length - 1]).format('YYYY-MM-DD HH:mm:ss');
this.maxTime = moment(this.intervals[0]).format('YYYY-MM-DD HH:mm:ss');
const currentPosition = this.interpolatedData.map(dataSource => dataSource[time]).map(ds => {
ds.minTime = this.minTime;
ds.maxTime = this.maxTime;
return ds;
});
this.activeTrip = currentPosition[0]; this.activeTrip = currentPosition[0];
this.minTime = moment(this.intervals[this.intervals.length - 1]).format('YYYY-MM-DD HH:mm:ss')
this.maxTime = moment(this.intervals[0]).format('YYYY-MM-DD HH:mm:ss')
this.calcLabel(); this.calcLabel();
this.calcTooltip(); this.calcTooltip();
if (this.mapWidget) { if (this.mapWidget) {

Loading…
Cancel
Save