Interactive interface for browsing global, full-resolution satellite imagery
correctly remove event listener
Benjamin King0088cf18b603
diff --git a/web/js/map/compare/spy.js b/web/js/map/compare/spy.jsindex 0865cbb0b..db3b0b116 100644--- a/web/js/map/compare/spy.js+++ b/web/js/map/compare/spy.js@@ -1,5 +1,4 @@import lodashEach from 'lodash/each';-import olObservable from 'ol/Observable';var mousePosition = null;var spy = null;@@ -47,7 +46,7 @@ export class Spy {*/destroy() {spy.removeEventListener('mousemove', this.updateSpy);- olObservable.un('pointerdrag', this.updateSpy);+ this.map.un('pointerdrag', this.updateSpy);this.mapCase.removeChild(label);removeListenersFromLayers(topLayers);removeInverseListenersFromLayers(bottomLayers);