Move player markers to their own pane

This commit is contained in:
James Lyne 2020-12-14 15:43:01 +00:00
parent 4c91b3225e
commit 76fe40d92a
2 changed files with 8 additions and 2 deletions

View File

@ -21,11 +21,15 @@ export default defineComponent({
} }
}, },
setup() { setup(props) {
props.leaflet.createPane('players');
const store = useStore(), const store = useStore(),
players = computed(() => store.state.players), players = computed(() => store.state.players),
componentSettings = store.state.components.playerMarkers, componentSettings = store.state.components.playerMarkers,
layerGroup = new LayerGroup(); layerGroup = new LayerGroup([],{
pane: 'players'
});
return { return {
players, players,

View File

@ -68,6 +68,8 @@ export default defineComponent({
showSkinFace: this.componentSettings!.showSkinFaces, showSkinFace: this.componentSettings!.showSkinFaces,
showBody: this.componentSettings!.showBodies, showBody: this.componentSettings!.showBodies,
showHealth: this.componentSettings!.showHealth, showHealth: this.componentSettings!.showHealth,
interactive: false,
pane: 'players',
}); });
if(this.currentWorld && this.currentWorld.name === this.player.location.world) { if(this.currentWorld && this.currentWorld.name === this.player.location.world) {