From 953b75d55e2c8a30d38a379043c552772bfc5f16 Mon Sep 17 00:00:00 2001 From: tim-herbst Date: Tue, 29 Dec 2020 14:48:19 +0100 Subject: [PATCH] fix display Issue on miniMap * future considerations: reduce massive boilerplate code due to different tableSources --- .../src/app/dashboard/dashboard.component.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts index 755f893..2b09ee5 100644 --- a/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/dashboard.component.ts @@ -533,9 +533,11 @@ export class DashboardComponent implements OnInit { if (point.stationId === row.stationId) { point.color = this.getColorTo(row); } - this.bikePointWithColor.push(point); }); - this.map.drawTableStationMarker(this.bikePointWithColor); + const markerToDisplay = []; + markerToDisplay.push(...this.selectionTo.selected); + markerToDisplay.push(...this.selectionFrom.selected); + this.map.drawTableStationMarker(markerToDisplay); } selectRowFrom(selection: MatCheckboxChange, row): void { @@ -544,9 +546,11 @@ export class DashboardComponent implements OnInit { if (point.stationId === row.stationId) { point.color = this.getColorFrom(row); } - this.bikePointWithColor.push(point); }); - this.map.drawTableStationMarker(this.bikePointWithColor); + const markerToDisplay = []; + markerToDisplay.push(...this.selectionFrom.selected); + markerToDisplay.push(...this.selectionTo.selected); + this.map.drawTableStationMarker(markerToDisplay); } getColorTo(value): string {