aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/StateController.js
diff options
context:
space:
mode:
authorEvgeny S Maksimov <admin@vragam.net>2019-02-25 20:46:48 +0300
committerEvgeny S Maksimov <admin@vragam.net>2019-02-25 20:46:48 +0300
commit9a14f9599659c587a646ee322db5b65fa65d801d (patch)
tree9ca5617b48ec4f134ab0bdffc2bdc9dab88b4a6a /web/app/view/StateController.js
parent05b555c6c8539f35c1caf3b1f4e252146f1e7d38 (diff)
downloadtrackermap-web-9a14f9599659c587a646ee322db5b65fa65d801d.tar.gz
trackermap-web-9a14f9599659c587a646ee322db5b65fa65d801d.tar.bz2
trackermap-web-9a14f9599659c587a646ee322db5b65fa65d801d.zip
Add connection between event and its state
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;