From 76fe40d92a8120b78809248f397525f9ed585746 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Mon, 14 Dec 2020 15:43:01 +0000 Subject: [PATCH] Move player markers to their own pane --- src/components/map/layer/PlayersLayer.vue | 8 ++++++-- src/components/map/marker/PlayerMarker.vue | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/map/layer/PlayersLayer.vue b/src/components/map/layer/PlayersLayer.vue index c1e2b70..48c31ff 100644 --- a/src/components/map/layer/PlayersLayer.vue +++ b/src/components/map/layer/PlayersLayer.vue @@ -21,11 +21,15 @@ export default defineComponent({ } }, - setup() { + setup(props) { + props.leaflet.createPane('players'); + const store = useStore(), players = computed(() => store.state.players), componentSettings = store.state.components.playerMarkers, - layerGroup = new LayerGroup(); + layerGroup = new LayerGroup([],{ + pane: 'players' + }); return { players, diff --git a/src/components/map/marker/PlayerMarker.vue b/src/components/map/marker/PlayerMarker.vue index 26ec20a..9d4e30b 100644 --- a/src/components/map/marker/PlayerMarker.vue +++ b/src/components/map/marker/PlayerMarker.vue @@ -68,6 +68,8 @@ export default defineComponent({ showSkinFace: this.componentSettings!.showSkinFaces, showBody: this.componentSettings!.showBodies, showHealth: this.componentSettings!.showHealth, + interactive: false, + pane: 'players', }); if(this.currentWorld && this.currentWorld.name === this.player.location.world) {