From b9c628b505b2755ffcb6e9a0b8f09e1b25abc5bb Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Fri, 15 Jan 2021 12:23:39 +0100 Subject: [PATCH 1/2] Change auto refresh toggle color --- .../auto-refresh/auto-refresh.component.html | 4 +++- projects/project-3/frontend/src/theme.scss | 22 +++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/projects/project-3/frontend/src/app/map/auto-refresh/auto-refresh.component.html b/projects/project-3/frontend/src/app/map/auto-refresh/auto-refresh.component.html index 52b3fa2..8480f0f 100644 --- a/projects/project-3/frontend/src/app/map/auto-refresh/auto-refresh.component.html +++ b/projects/project-3/frontend/src/app/map/auto-refresh/auto-refresh.component.html @@ -1,3 +1,5 @@
- auto refresh + + auto refresh +
diff --git a/projects/project-3/frontend/src/theme.scss b/projects/project-3/frontend/src/theme.scss index 3e8b0af..4cbec53 100644 --- a/projects/project-3/frontend/src/theme.scss +++ b/projects/project-3/frontend/src/theme.scss @@ -191,23 +191,23 @@ $mat-accent: ( $theme-accent: mat-palette($mat-accent, main, lighter, darker); body { - --warn-color: #ff0000; - --warn-lighter-color: #ffb3b3; - --warn-darker-color: #ff0000; - --text-warn-color: #{$light-primary-text}; + --warn-color: #ffffff; + --warn-lighter-color: #ffffff; + --warn-darker-color: #ffffff; + --text-warn-color: #{$dark-primary-text}; --text-warn-lighter-color: #{$dark-primary-text}; - --text-warn-darker-color: #{$light-primary-text}; + --text-warn-darker-color: #{$dark-primary-text}; } $mat-warn: ( - main: #ff0000, - lighter: #ffb3b3, - darker: #ff0000, - 200: #ff0000, // For slide toggle, + main: #ffffff, + lighter: #ffffff, + darker: #ffffff, + 200: #ffffff, // For slide toggle, contrast : ( - main: $light-primary-text, + main: $dark-primary-text, lighter: $dark-primary-text, - darker: $light-primary-text, + darker: $dark-primary-text, ) ); $theme-warn: mat-palette($mat-warn, main, lighter, darker);; From b0741fc0fe3f56331ffce3dbd75221036ae68136 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Fri, 15 Jan 2021 12:24:15 +0100 Subject: [PATCH 2/2] Change color and performance in table --- .../frontend/src/app/dashboard/table/table.component.ts | 4 ++-- projects/project-3/frontend/src/app/service/map.service.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/project-3/frontend/src/app/dashboard/table/table.component.ts b/projects/project-3/frontend/src/app/dashboard/table/table.component.ts index 03c5ab6..268b446 100644 --- a/projects/project-3/frontend/src/app/dashboard/table/table.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/table/table.component.ts @@ -86,11 +86,11 @@ export class TableComponent implements OnInit { this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red']; this.stationToSource = this.setBikePointColorToSource(stationTo); this.iterableToSource = stationTo; - this.iterableToSource.forEach(bikePoint => bikePoint.polyLineColor = 'green'); + this.iterableToSource.forEach(bikePoint => bikePoint.polyLineColor = 'red'); this.stationFromSource = this.setBikePointColorFromSource(stationFrom); this.iterableFromSource = stationFrom; - this.iterableFromSource.forEach(bikePoint => bikePoint.polyLineColor = 'red'); + this.iterableFromSource.forEach(bikePoint => bikePoint.polyLineColor = 'green'); this.selectionModel.select(...this.iterableFromSource.filter(bikePoint => bikePoint.stationId === this.bikePoint.id)); this.selectionModel.select(...this.iterableToSource.filter(bikePoint => bikePoint.stationId === this.bikePoint.id)); diff --git a/projects/project-3/frontend/src/app/service/map.service.ts b/projects/project-3/frontend/src/app/service/map.service.ts index 297f9fd..d91ac47 100644 --- a/projects/project-3/frontend/src/app/service/map.service.ts +++ b/projects/project-3/frontend/src/app/service/map.service.ts @@ -159,7 +159,8 @@ export class MapService { color: severityColor, fillColor: severityColor, fillOpacity: 0.5, - radius: 30 + radius: 30, + interactive: false }); accidents.push(accidentMarker); } @@ -198,8 +199,8 @@ export class MapService { marker.on('mouseout', e => e.target.closePopup()); this.drawLineOnMiniMap(marker, point); this.markerLayer.push(marker); - this.miniMap.fitBounds(L.featureGroup([this.dashBoardMarker, ...this.markerLayer]).getBounds()); } + this.miniMap.fitBounds(L.featureGroup([this.dashBoardMarker, ...this.markerLayer]).getBounds()); if (this.polylineLayer.length === 0) { this.legend.remove(); } else {