aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-15 23:08:57 +1300
committerGitHub <noreply@github.com>2017-03-15 23:08:57 +1300
commitfd2207b15d98d8fdef306f3b94924a759c80a3d9 (patch)
treea50b36f4f3c5da83f8a13955331a4688c75e96b5 /web/app/view/MapController.js
parentd77cc1c9b2890224119d59b493597e47e3f1792f (diff)
parent7135682a0f262dc4b76f41bec2db4c022f88b17b (diff)
downloadetbsa-traccar-web-fd2207b15d98d8fdef306f3b94924a759c80a3d9.tar.gz
etbsa-traccar-web-fd2207b15d98d8fdef306f3b94924a759c80a3d9.tar.bz2
etbsa-traccar-web-fd2207b15d98d8fdef306f3b94924a759c80a3d9.zip
Merge pull request #440 from Abyss777/zoom_to_all
Zoom to all devices on start
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r--web/app/view/MapController.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index 95296f1..57727f2 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -28,7 +28,8 @@ Ext.define('Traccar.view.MapController', {
controller: {
'*': {
mapstaterequest: 'getMapState',
- togglestaterequest: 'getToggleState'
+ togglestaterequest: 'getToggleState',
+ zoomtoalldevices: 'zoomToAllDevices'
}
},
store: {
@@ -98,5 +99,9 @@ Ext.define('Traccar.view.MapController', {
return true;
}, this);
}
+ },
+
+ zoomToAllDevices: function () {
+ this.zoomToAllPositions(Ext.getStore('LatestPositions').getData().items);
}
});