From fe47299d6cc02a4e43a1d2f3a788897be8a6f5ce Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 2 Feb 2019 12:55:29 -0800 Subject: Fix openlayers upgrade issues (fix #724) --- web/app/view/map/GeofenceMap.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web/app/view/map/GeofenceMap.js') diff --git a/web/app/view/map/GeofenceMap.js b/web/app/view/map/GeofenceMap.js index 6b06ae98..8cef574b 100644 --- a/web/app/view/map/GeofenceMap.js +++ b/web/app/view/map/GeofenceMap.js @@ -105,13 +105,14 @@ Ext.define('Traccar.view.map.GeofenceMap', { }, addInteraction: function (type) { + var self = this; this.draw = new ol.interaction.Draw({ features: this.features, type: type }); this.draw.on('drawstart', function () { - this.features.clear(); - }, this); + self.features.clear(); + }); this.map.addInteraction(this.draw); }, -- cgit v1.2.3