diff options
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/view/StateController.js | 9 | ||||
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 6363fc9c..58478d28 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -33,6 +33,7 @@ Ext.define('Traccar.view.StateController', { '*': { selectdevice: 'selectDevice', selectreport: 'selectReport', + selectevent: 'selectEvent', deselectfeature: 'deselectFeature' } }, @@ -175,6 +176,14 @@ Ext.define('Traccar.view.StateController', { } }, + selectEvent: function (position) { + if (position instanceof Traccar.model.Position) { + this.deviceId = null; + this.position = position; + this.updatePosition(); + } + }, + deselectFeature: function () { this.deviceId = null; this.position = null; diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js index 28f1226e..b7a1e296 100644 --- a/web/app/view/map/MapMarkerController.js +++ b/web/app/view/map/MapMarkerController.js @@ -501,7 +501,6 @@ Ext.define('Traccar.view.map.MapMarkerController', { selectEvent: function (position) { var marker; - this.fireEvent('deselectfeature'); if (position) { marker = this.addReportMarker(position); marker.set('event', true); |