From 9a14f9599659c587a646ee322db5b65fa65d801d Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Mon, 25 Feb 2019 20:46:48 +0300 Subject: Add connection between event and its state --- web/app/view/StateController.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web/app/view/StateController.js') diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 6363fc9..58478d2 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; -- cgit v1.2.3