Browse Source

Merge pull request #6496 from kalutkaz/fix/adaptMarkerTripAnimation

[3.4] UI:Marker does not adapt when the entity has no data
pull/6682/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
420c2725f1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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

@ -112,14 +112,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