aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/StateController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/StateController.js')
-rw-r--r--web/app/view/StateController.js9
1 files changed, 9 insertions, 0 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;