From e042dbc8f28faa005019744abf0d8c80340902bf Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 7 Oct 2016 13:45:58 +0500 Subject: - Draw trip route on click - Add some object class checks - Add missed imports --- web/app/view/StateController.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web/app/view/StateController.js') diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 8a194940..b0188081 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -23,6 +23,7 @@ Ext.define('Traccar.view.StateController', { 'Traccar.AttributeFormatter', 'Traccar.model.Attribute', 'Traccar.model.AttributeAlias', + 'Traccar.model.Position', 'Traccar.view.AttributeAliasDialog' ], @@ -149,9 +150,11 @@ Ext.define('Traccar.view.StateController', { }, selectReport: function (position) { - this.deviceId = null; - this.position = position; - this.updatePosition(); + if (position instanceof Traccar.model.Position) { + this.deviceId = null; + this.position = position; + this.updatePosition(); + } }, clearReport: function (store) { -- cgit v1.2.3