diff options
author | Abyss777 <abyss@fox5.ru> | 2017-02-13 12:27:29 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-02-13 12:27:29 +0500 |
commit | 12684a1284721b83e189d93969e00eb8b8564448 (patch) | |
tree | 4e2f4953ab56070225e93e0c2e2497514a45f94f /web/app/view/MapMarkerController.js | |
parent | 1db0f3fce321a6f22da47998a53f6a5bf7bc7b36 (diff) | |
download | trackermap-web-12684a1284721b83e189d93969e00eb8b8564448.tar.gz trackermap-web-12684a1284721b83e189d93969e00eb8b8564448.tar.bz2 trackermap-web-12684a1284721b83e189d93969e00eb8b8564448.zip |
- Use more efficient method to lookup store
- Remove unnecessary parameter from mapVew.fit()
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r-- | web/app/view/MapMarkerController.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js index 39517553..27591c18 100644 --- a/web/app/view/MapMarkerController.js +++ b/web/app/view/MapMarkerController.js @@ -171,7 +171,7 @@ Ext.define('Traccar.view.MapMarkerController', { for (i = 0; i < data.length; i++) { position = data[i]; - device = Ext.getStore('Devices').findRecord('id', position.get('deviceId'), 0, false, false, true); + device = Ext.getStore('Devices').getById(position.get('deviceId')); if (device) { this.updateAccuracy(position); @@ -333,9 +333,9 @@ Ext.define('Traccar.view.MapMarkerController', { } } if (minx !== maxx || miny !== maxy) { - this.getView().getMapView().fit([minx, miny, maxx, maxy], this.getView().getMap().getSize()); + this.getView().getMapView().fit([minx, miny, maxx, maxy]); } else if (point) { - this.getView().getMapView().fit(new ol.geom.Point(point), this.getView().getMap().getSize()); + this.getView().getMapView().fit(new ol.geom.Point(point)); } }, |