diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-18 09:32:54 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 09:32:54 +1300 |
commit | 6171c7275a32c3ad9653aafaf673ab93254c8d1a (patch) | |
tree | 49828903f03061e2f72fc35130055927c8a346fc /web/app/view/MapController.js | |
parent | 4d092d96d6d872096abaf2f9883d2b578c5c8f72 (diff) | |
parent | 75828393fd64389be296c95bc67144b0c742cf48 (diff) | |
download | trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.tar.gz trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.tar.bz2 trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.zip |
Merge pull request #385 from Abyss777/manager
Implement user management
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r-- | web/app/view/MapController.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index 43d86d97..95296f14 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ Ext.define('Traccar.view.MapController', { }, store: { '#Geofences': { - load: 'showGeofences', + load: 'updateGeofences', add: 'updateGeofences', update: 'updateGeofences', remove: 'updateGeofences' @@ -86,7 +86,8 @@ Ext.define('Traccar.view.MapController', { this.fireEvent('togglestate', state); }, - showGeofences: function () { + updateGeofences: function () { + this.getView().getGeofencesSource().clear(); if (this.lookupReference('showGeofencesButton').pressed) { Ext.getStore('Geofences').each(function (geofence) { var feature = new ol.Feature(Traccar.GeofenceConverter @@ -96,15 +97,6 @@ Ext.define('Traccar.view.MapController', { this.getView().getGeofencesSource().addFeature(feature); return true; }, this); - } else { - this.getView().getGeofencesSource().clear(); - } - }, - - updateGeofences: function () { - if (this.lookupReference('showGeofencesButton').pressed) { - this.getView().getGeofencesSource().clear(); - this.showGeofences(); } } }); |