diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-15 18:52:03 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-15 18:52:03 +1200 |
commit | b4e2d507666121c8219894fb108be43de22e48d0 (patch) | |
tree | 7ebff718182d2b06413a6219f0b417035e89601d /web/app/view/map | |
parent | 8a48bca94e9d76bdae60453ca0231543e66c378e (diff) | |
download | trackermap-web-b4e2d507666121c8219894fb108be43de22e48d0.tar.gz trackermap-web-b4e2d507666121c8219894fb108be43de22e48d0.tar.bz2 trackermap-web-b4e2d507666121c8219894fb108be43de22e48d0.zip |
Hide event marker if no position
Diffstat (limited to 'web/app/view/map')
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 10 |
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) { |