diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-10 13:20:51 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-10 13:20:51 +0500 |
commit | fb76f0118e148f77c83fb55e75c805127bb597a2 (patch) | |
tree | 9ba6f9ee7572006daf8fda8626d04516b6972034 /web/app/view | |
parent | 185a6e4b3518ea7cebac33430751507b1bb94994 (diff) | |
download | trackermap-web-fb76f0118e148f77c83fb55e75c805127bb597a2.tar.gz trackermap-web-fb76f0118e148f77c83fb55e75c805127bb597a2.tar.bz2 trackermap-web-fb76f0118e148f77c83fb55e75c805127bb597a2.zip |
- Update device icon on map after device update
- Fix devices buttons enabling
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/DevicesController.js | 1 | ||||
-rw-r--r-- | web/app/view/MapController.js | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index aa8e7886..a31ceb77 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -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); }, diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index 103d62ed..c981fabc 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -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'))); } } }, |