aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapMarkerController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r--web/app/view/MapMarkerController.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js
index 71a15839..596cffb3 100644
--- a/web/app/view/MapMarkerController.js
+++ b/web/app/view/MapMarkerController.js
@@ -31,7 +31,8 @@ Ext.define('Traccar.view.MapMarkerController', {
controller: {
'*': {
selectdevice: 'selectDevice',
- selectreport: 'selectReport'
+ selectreport: 'selectReport',
+ showsingleevent: 'showSingleEvent'
}
},
store: {
@@ -65,6 +66,10 @@ Ext.define('Traccar.view.MapMarkerController', {
this.liveRouteLength = Traccar.app.getAttributePreference('web.liveRouteLength', 10);
},
+ showSingleEvent: function () {
+ this.singleEvent = true;
+ },
+
getDeviceColor: function (device) {
switch (device.get('status')) {
case 'online':
@@ -248,9 +253,9 @@ Ext.define('Traccar.view.MapMarkerController', {
} else if (geometry) {
this.getView().getMapView().fit(geometry, this.getView().getMap().getSize());
}
- if (Traccar.app.hasEventId) {
+ if (this.singleEvent) {
+ this.singleEvent = false;
this.fireEvent('selectreport', data[0], false);
- Traccar.app.hasEventId = false;
}
},