From 3b50c49e6dfe47533ba7d47884fcbab8a87e6262 Mon Sep 17 00:00:00 2001 From: byWulf Date: Tue, 6 Nov 2018 20:08:52 +0100 Subject: [PATCH 1/2] Bugfix when the l-icon-tag is hidden --- src/components/LIcon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LIcon.vue b/src/components/LIcon.vue index bd9605db..1441e764 100644 --- a/src/components/LIcon.vue +++ b/src/components/LIcon.vue @@ -106,7 +106,7 @@ export default { beforeDestroy () { if (this.parentContainer.mapObject) { - this.parentContainer.mapObject.setIcon(null); + this.parentContainer.mapObject.setIcon(this.parentContainer.$props.icon); } this.observer.disconnect(); From 5a306f9ce4754b4d9c86d8321b440258c1e57722 Mon Sep 17 00:00:00 2001 From: byWulf Date: Tue, 6 Nov 2018 21:57:53 +0100 Subject: [PATCH 2/2] Bugfix swapping HTML when marker is not on the map --- src/components/LIcon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LIcon.vue b/src/components/LIcon.vue index 1441e764..bee07578 100644 --- a/src/components/LIcon.vue +++ b/src/components/LIcon.vue @@ -127,7 +127,7 @@ export default { createIcon () { // If only html of a divIcon changed, we can just replace the DOM without the need of recreating the whole icon - if (this.htmlSwapNeeded && !this.recreationNeeded && this.iconObject) { + if (this.htmlSwapNeeded && !this.recreationNeeded && this.iconObject && this.parentContainer.mapObject.getElement()) { this.parentContainer.mapObject.getElement().innerHTML = this.$el.innerHTML; this.htmlSwapNeeded = false;