diff options
Diffstat (limited to 'web/app/view/map')
-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 28f1226..295d2f5 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); |