From bfe1227df5892e7542d80559363833c302a02077 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 24 Jun 2015 20:12:01 +1200 Subject: Properly fix state update --- web/app/view/state/StateController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 6b6ccf184..b6a6cc542 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -30,8 +30,8 @@ Ext.define('Traccar.view.state.StateController', { init: function() { var store = Ext.getStore('LiveData'); - store.on('add', this.add); - store.on('update', this.update); + store.on('add', this.add, this); + store.on('update', this.update, this); }, keys: { @@ -100,7 +100,7 @@ Ext.define('Traccar.view.state.StateController', { }, selectDevice: function(device) { - this.deviceId = device.get('deviceId'); + this.deviceId = device.get('id'); var found = Ext.getStore('LiveData').query('deviceId', this.deviceId); if (found.getCount() > 0) { this.updatePosition(found.first()); -- cgit v1.2.3