diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-15 19:08:58 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-15 19:08:58 +1200 |
commit | 7a0c47e8203f300d193e2291848526f9d63c5a8e (patch) | |
tree | 40567c1e84532ee99ab6aa53cb2fc7d52b279f36 /web/app/view/map | |
parent | b4e2d507666121c8219894fb108be43de22e48d0 (diff) | |
download | etbsa-traccar-web-7a0c47e8203f300d193e2291848526f9d63c5a8e.tar.gz etbsa-traccar-web-7a0c47e8203f300d193e2291848526f9d63c5a8e.tar.bz2 etbsa-traccar-web-7a0c47e8203f300d193e2291848526f9d63c5a8e.zip |
Fix more event selection issues
Diffstat (limited to 'web/app/view/map')
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js index aa5be0f..951a825 100644 --- a/web/app/view/map/MapMarkerController.js +++ b/web/app/view/map/MapMarkerController.js @@ -454,7 +454,9 @@ Ext.define('Traccar.view.map.MapMarkerController', { if (this.selectedMarker) { if (this.selectedMarker.get('event')) { this.getView().getMarkersSource().removeFeature(this.selectedMarker); - this.fireEvent('deselectevent'); + 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); @@ -495,6 +497,7 @@ Ext.define('Traccar.view.map.MapMarkerController', { }, selectEvent: function (position) { + this.fireEvent('deselectfeature'); if (position) { var maker = this.addReportMarker(position); maker.set('event', true); |