mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-09 04:37:33 +08:00
- Update device icon on map after device update
- Fix devices buttons enabling
This commit is contained in:
parent
185a6e4b35
commit
fb76f0118e
@ -147,6 +147,7 @@ Ext.define('Traccar.view.DevicesController', {
|
||||
|
||||
selectDevice: function (device, center) {
|
||||
this.getView().getSelectionModel().select([device], false, true);
|
||||
this.updateButtons(this.getView().getSelectionModel());
|
||||
this.getView().getView().focusRow(device);
|
||||
},
|
||||
|
||||
|
@ -86,12 +86,12 @@ Ext.define('Traccar.view.MapController', {
|
||||
}
|
||||
},
|
||||
|
||||
changeMarkerColor: function (style, color) {
|
||||
changeMarkerColor: function (style, color, category) {
|
||||
var newStyle = new ol.style.Style({
|
||||
image: Traccar.DeviceImages.getImageIcon(color,
|
||||
style.getImage().zoom,
|
||||
style.getImage().angle,
|
||||
style.getImage().category),
|
||||
category),
|
||||
text: style.getText()
|
||||
});
|
||||
return newStyle;
|
||||
@ -111,7 +111,7 @@ Ext.define('Traccar.view.MapController', {
|
||||
if (deviceId in this.latestMarkers) {
|
||||
marker = this.latestMarkers[deviceId];
|
||||
marker.setStyle(
|
||||
this.changeMarkerColor(marker.getStyle(), this.getDeviceColor(device)));
|
||||
this.changeMarkerColor(marker.getStyle(), this.getDeviceColor(device), device.get('category')));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user