Browse Source

fix trip animation map

pull/6496/head
kalutkaz 4 years ago
parent
commit
7e500c5237
  1. 14
      ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts

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

@ -136,14 +136,12 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy
item => this.clearIncorrectFirsLastDatapoint(item)).filter(arr => arr.length);
this.interpolatedTimeData.length = 0;
this.formattedInterpolatedTimeData.length = 0;
if (this.historicalData.length) {
const prevMinTime = this.minTime;
const prevMaxTime = this.maxTime;
this.calculateIntervals();
const currentTime = this.calculateCurrentTime(prevMinTime, prevMaxTime);
if (currentTime !== this.currentTime) {
this.timeUpdated(currentTime);
}
const prevMinTime = this.minTime;
const prevMaxTime = this.maxTime;
this.calculateIntervals();
const currentTime = this.calculateCurrentTime(prevMinTime, prevMaxTime);
if (currentTime !== this.currentTime) {
this.timeUpdated(currentTime);
}
this.mapWidget.map.map?.invalidateSize();
this.mapWidget.map.setLoading(false);

Loading…
Cancel
Save