Merge branch 'frontend-bugfix'

This commit is contained in:
Marcel Schwarz 2021-01-15 12:24:27 +01:00
commit 4b91b4401f
4 changed files with 19 additions and 16 deletions

View File

@ -86,11 +86,11 @@ export class TableComponent implements OnInit {
this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red']; this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red'];
this.stationToSource = this.setBikePointColorToSource(stationTo); this.stationToSource = this.setBikePointColorToSource(stationTo);
this.iterableToSource = stationTo; this.iterableToSource = stationTo;
this.iterableToSource.forEach(bikePoint => bikePoint.polyLineColor = 'green'); this.iterableToSource.forEach(bikePoint => bikePoint.polyLineColor = 'red');
this.stationFromSource = this.setBikePointColorFromSource(stationFrom); this.stationFromSource = this.setBikePointColorFromSource(stationFrom);
this.iterableFromSource = 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.iterableFromSource.filter(bikePoint => bikePoint.stationId === this.bikePoint.id));
this.selectionModel.select(...this.iterableToSource.filter(bikePoint => bikePoint.stationId === this.bikePoint.id)); this.selectionModel.select(...this.iterableToSource.filter(bikePoint => bikePoint.stationId === this.bikePoint.id));

View File

@ -1,3 +1,5 @@
<div> <div>
<mat-slide-toggle [(ngModel)]="isFlagActive" (ngModelChange)="onChange($event)">auto refresh</mat-slide-toggle> <mat-slide-toggle [(ngModel)]="isFlagActive" (ngModelChange)="onChange($event)" color="warn">
auto refresh
</mat-slide-toggle>
</div> </div>

View File

@ -159,7 +159,8 @@ export class MapService {
color: severityColor, color: severityColor,
fillColor: severityColor, fillColor: severityColor,
fillOpacity: 0.5, fillOpacity: 0.5,
radius: 30 radius: 30,
interactive: false
}); });
accidents.push(accidentMarker); accidents.push(accidentMarker);
} }
@ -198,8 +199,8 @@ export class MapService {
marker.on('mouseout', e => e.target.closePopup()); marker.on('mouseout', e => e.target.closePopup());
this.drawLineOnMiniMap(marker, point); this.drawLineOnMiniMap(marker, point);
this.markerLayer.push(marker); 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) { if (this.polylineLayer.length === 0) {
this.legend.remove(); this.legend.remove();
} else { } else {

View File

@ -191,23 +191,23 @@ $mat-accent: (
$theme-accent: mat-palette($mat-accent, main, lighter, darker); $theme-accent: mat-palette($mat-accent, main, lighter, darker);
body { body {
--warn-color: #ff0000; --warn-color: #ffffff;
--warn-lighter-color: #ffb3b3; --warn-lighter-color: #ffffff;
--warn-darker-color: #ff0000; --warn-darker-color: #ffffff;
--text-warn-color: #{$light-primary-text}; --text-warn-color: #{$dark-primary-text};
--text-warn-lighter-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: ( $mat-warn: (
main: #ff0000, main: #ffffff,
lighter: #ffb3b3, lighter: #ffffff,
darker: #ff0000, darker: #ffffff,
200: #ff0000, // For slide toggle, 200: #ffffff, // For slide toggle,
contrast : ( contrast : (
main: $light-primary-text, main: $dark-primary-text,
lighter: $dark-primary-text, lighter: $dark-primary-text,
darker: $light-primary-text, darker: $dark-primary-text,
) )
); );
$theme-warn: mat-palette($mat-warn, main, lighter, darker);; $theme-warn: mat-palette($mat-warn, main, lighter, darker);;