diff options
Diffstat (limited to 'web/app/view/map/MapMarkerController.js')
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js index b7a1e296..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,6 +493,8 @@ 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); } }, |