diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-27 12:34:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 12:34:24 -0800 |
commit | ecde88443393ac77b133d2682fef3885f859818e (patch) | |
tree | 9edb97a56389614132a645b03220ecdc8b5fa6b4 /web/app/view/map/MapMarkerController.js | |
parent | 05b555c6c8539f35c1caf3b1f4e252146f1e7d38 (diff) | |
parent | 6dd4cb71561be3d41da3d10b810fb078f10e79b3 (diff) | |
download | trackermap-web-ecde88443393ac77b133d2682fef3885f859818e.tar.gz trackermap-web-ecde88443393ac77b133d2682fef3885f859818e.tar.bz2 trackermap-web-ecde88443393ac77b133d2682fef3885f859818e.zip |
Merge pull request #730 from iEvgeny/event2pos
Add connection between event and its state
Diffstat (limited to 'web/app/view/map/MapMarkerController.js')
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js index 28f1226e..295d2f50 100644 --- a/web/app/view/map/MapMarkerController.js +++ b/web/app/view/map/MapMarkerController.js @@ -457,9 +457,6 @@ Ext.define('Traccar.view.map.MapMarkerController', { if (this.selectedMarker) { if (this.selectedMarker.get('event')) { this.getView().getMarkersSource().removeFeature(this.selectedMarker); - if (!marker || !marker.get('event')) { - this.fireEvent('deselectevent'); - } } else if (!Ext.getStore('ReportRoute').showMarkers && this.selectedMarker.get('record') instanceof Traccar.model.Position) { this.getView().getMarkersSource().removeFeature(this.selectedMarker); @@ -496,12 +493,13 @@ Ext.define('Traccar.view.map.MapMarkerController', { this.reportMarkers[position.get('id')] = this.addReportMarker(position); } this.selectMarker(this.reportMarkers[position.get('id')], center); + } else if (this.selectedMarker) { + this.selectMarker(null, false); } }, selectEvent: function (position) { var marker; - this.fireEvent('deselectfeature'); if (position) { marker = this.addReportMarker(position); marker.set('event', true); |