Change color and performance in table

This commit is contained in:
Marcel Schwarz 2021-01-15 12:24:15 +01:00
parent b9c628b505
commit b0741fc0fe
2 changed files with 5 additions and 4 deletions

View File

@ -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));

View File

@ -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 {