Skip to content

Commit c10d2a4

Browse files
committed
More debugging
1 parent 0174dc6 commit c10d2a4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/components/LIcon.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ export default {
9595
propsBinder(this, null, this.$options.props);
9696
9797
this.observer = new MutationObserver(() => {
98-
this.createIcon();
98+
this.createIcon('html slot');
9999
});
100100
this.observer.observe(
101101
this.$el,
102102
{ attributes: true, childList: true, characterData: true, subtree: true }
103103
);
104104
105-
this.createIcon();
105+
this.createIcon('initial');
106106
},
107107
108108
beforeDestroy () {
@@ -114,8 +114,8 @@ export default {
114114
},
115115
116116
methods: {
117-
createIcon () {
118-
console.log(Date.now() + ' - recreate ' + this.tempName);
117+
createIcon (reason) {
118+
console.log(Date.now() + ' - recreate ' + this.tempName + ' (' + reason + ')');
119119
120120
if (this.iconObject) {
121121
L.DomEvent.off(this.iconObject, this.$listeners);
@@ -149,40 +149,40 @@ export default {
149149
this.parentContainer.mapObject.setIcon(this.iconObject);
150150
},
151151
setIconUrl () {
152-
this.createIcon();
152+
this.createIcon('iconUrl');
153153
},
154154
setIconRetinaUrl () {
155-
this.createIcon();
155+
this.createIcon('iconRetinaUrl');
156156
},
157157
setIconSize () {
158-
this.createIcon();
158+
this.createIcon('iconSize');
159159
},
160160
setIconAnchor () {
161-
this.createIcon();
161+
this.createIcon('iconAnchor');
162162
},
163163
setPopupAnchor () {
164-
this.createIcon();
164+
this.createIcon('popupAnchor');
165165
},
166166
setTooltipAnchor () {
167-
this.createIcon();
167+
this.createIcon('tooltipAnchor');
168168
},
169169
setShadowUrl () {
170-
this.createIcon();
170+
this.createIcon('shadowUrl');
171171
},
172172
setShadowRetinaUrl () {
173-
this.createIcon();
173+
this.createIcon('shadowRetinaUrl');
174174
},
175175
setShadowAnchor () {
176-
this.createIcon();
176+
this.createIcon('shadowAnchor');
177177
},
178178
setBgPos () {
179-
this.createIcon();
179+
this.createIcon('bgPos');
180180
},
181181
setClassName () {
182-
this.createIcon();
182+
this.createIcon('className');
183183
},
184184
setHtml () {
185-
this.createIcon();
185+
this.createIcon('html');
186186
}
187187
},
188188

0 commit comments

Comments
 (0)