Skip to content

Commit

Permalink
chore: add a v-if toggle to simple example to replicate memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolò Maria Mezzopera committed Jul 24, 2019
1 parent 7449de0 commit e908516
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/src/components/Simple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<p>First marker is placed at {{ withPopup.lat }}, {{ withPopup.lng }}</p>
<p>Center is at {{ currentCenter }} and the zoom is: {{ currentZoom }}</p>
<button @click="showLongText">Toggle long popup</button>
<button @click="showMap = !showMap">Toggle map</button>
</div>
<l-map
v-if="showMap"
:zoom="zoom"
:center="center"
:options="mapOptions"
Expand Down Expand Up @@ -70,7 +72,8 @@ export default {
showParagraph: false,
mapOptions: {
zoomSnap: 0.5
}
},
showMap: true
};
},
methods: {
Expand Down

0 comments on commit e908516

Please sign in to comment.