diff options
author | Abyss777 <abyss@fox5.ru> | 2016-09-06 15:58:03 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-09-06 15:58:03 +0500 |
commit | 97e80ec49fddec3d56880bae47bd070474fa8fa3 (patch) | |
tree | 79139d5328cba462f385a4876b71b3add6a7f7a2 /web/app/view/ServerDialogController.js | |
parent | 0affb8110de3c53942c85a220babc859e2a7727d (diff) | |
download | trackermap-server-97e80ec49fddec3d56880bae47bd070474fa8fa3.tar.gz trackermap-server-97e80ec49fddec3d56880bae47bd070474fa8fa3.tar.bz2 trackermap-server-97e80ec49fddec3d56880bae47bd070474fa8fa3.zip |
- Remove field container
- Renamed functions and strings
Diffstat (limited to 'web/app/view/ServerDialogController.js')
-rw-r--r-- | web/app/view/ServerDialogController.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/web/app/view/ServerDialogController.js b/web/app/view/ServerDialogController.js index 42760ca58..55f49f676 100644 --- a/web/app/view/ServerDialogController.js +++ b/web/app/view/ServerDialogController.js @@ -23,20 +23,19 @@ Ext.define('Traccar.view.ServerDialogController', { listen: { controller: { '*': { - setCenterFromMap: 'setCenterFromMap' + mapstate: 'setMapState' } } } }, - getFromMap: function (button) { - this.fireEvent('getMapCenter'); + getMapState: function (button) { + this.fireEvent('mapstaterequest'); }, - setCenterFromMap: function (lat, lon, zoom) { - var mapCenter = this.lookupReference('mapCenter'); - mapCenter.down('numberfield[name="latitude"]').setValue(lat); - mapCenter.down('numberfield[name="longitude"]').setValue(lon); - mapCenter.down('numberfield[name="zoom"]').setValue(zoom); + setMapState: function (lat, lon, zoom) { + this.getView().lookupReference('latitude').setValue(lat); + this.getView().lookupReference('longitude').setValue(lon); + this.getView().lookupReference('zoom').setValue(zoom); } }); |