We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 537e3d4 commit 4ea6d23Copy full SHA for 4ea6d23
src/components/ol/Map.vue
@@ -78,6 +78,7 @@ export default {
78
me.map.updateSize();
79
});
80
resizeObserver.observe(container);
81
+ this.resizeObserver = resizeObserver;
82
83
// add tabIndex attribute to the map's container, so it gets focusable.
84
// Otherwise the OL keyboard navigation won't work, see keyboardEventTarget
@@ -98,6 +99,11 @@ export default {
98
99
}, 200);
100
},
101
destroyed () {
102
+ // unregister resizing of the map
103
+ if (this.resizeObserver) {
104
+ this.resizeObserver.disconnect();
105
+ }
106
+
107
// Send the event 'ol-map-unmounted' with the OL map as payload
108
WguEventBus.$emit('ol-map-unmounted', this.map);
109
0 commit comments