aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/MapMarkerController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/map/MapMarkerController.js')
-rw-r--r--web/app/view/map/MapMarkerController.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js
index 5d41932e..aa5be0f7 100644
--- a/web/app/view/map/MapMarkerController.js
+++ b/web/app/view/map/MapMarkerController.js
@@ -495,9 +495,13 @@ Ext.define('Traccar.view.map.MapMarkerController', {
},
selectEvent: function (position) {
- var maker = this.addReportMarker(position);
- maker.set('event', true);
- this.selectMarker(maker, true);
+ if (position) {
+ var maker = this.addReportMarker(position);
+ maker.set('event', true);
+ this.selectMarker(maker, true);
+ } else if (this.selectedMarker && this.selectedMarker.get('event')) {
+ this.selectMarker(null, false);
+ }
},
selectFeature: function (feature) {