Skip to content

Commit e908516

Browse files
author
Nicolò Maria Mezzopera
committed
chore: add a v-if toggle to simple example to replicate memory leak
1 parent 7449de0 commit e908516

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/src/components/Simple.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<p>First marker is placed at {{ withPopup.lat }}, {{ withPopup.lng }}</p>
66
<p>Center is at {{ currentCenter }} and the zoom is: {{ currentZoom }}</p>
77
<button @click="showLongText">Toggle long popup</button>
8+
<button @click="showMap = !showMap">Toggle map</button>
89
</div>
910
<l-map
11+
v-if="showMap"
1012
:zoom="zoom"
1113
:center="center"
1214
:options="mapOptions"
@@ -70,7 +72,8 @@ export default {
7072
showParagraph: false,
7173
mapOptions: {
7274
zoomSnap: 0.5
73-
}
75+
},
76+
showMap: true
7477
};
7578
},
7679
methods: {

0 commit comments

Comments
 (0)