From 79fc8f68166d85481c2ae94ad38b0b36cd11a4f7 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 1 Sep 2021 17:39:44 +0100 Subject: [PATCH] Reuse existing players pane if present --- src/components/map/layer/PlayersLayer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/map/layer/PlayersLayer.vue b/src/components/map/layer/PlayersLayer.vue index 61fb450..adeb6fd 100644 --- a/src/components/map/layer/PlayersLayer.vue +++ b/src/components/map/layer/PlayersLayer.vue @@ -39,7 +39,7 @@ export default defineComponent({ setup(props) { const store = useStore(), - playerPane = props.leaflet.createPane('players'), + playerPane = props.leaflet.getPane('players') || props.leaflet.createPane('players'), players = computed(() => store.state.players), playerCount = computed(() => store.state.players.size), playersAboveMarkers = computed(() => store.state.ui.playersAboveMarkers),