Fix hidebydefault preventing player marker player being added to the layer control
This commit is contained in:
parent
6eec608eb1
commit
c5f8644587
@ -42,7 +42,7 @@ export default defineComponent({
|
||||
playerPane = props.leaflet.createPane('players'),
|
||||
players = computed(() => store.state.players),
|
||||
playerCount = computed(() => store.state.players.size),
|
||||
componentSettings = store.state.components.playerMarkers,
|
||||
componentSettings = computed(() => store.state.components.playerMarkers),
|
||||
layerGroup = new LayerGroup([],{
|
||||
pane: 'players'
|
||||
});
|
||||
@ -63,6 +63,11 @@ export default defineComponent({
|
||||
true,
|
||||
useStore().state.messages.players,
|
||||
this.componentSettings!.layerPriority);
|
||||
} else {
|
||||
this.leaflet.getLayerManager().addHiddenLayer(
|
||||
this.layerGroup,
|
||||
useStore().state.messages.players,
|
||||
this.componentSettings!.layerPriority);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -32,16 +32,13 @@ export default class LayerManager {
|
||||
});
|
||||
|
||||
if(showControl.value) {
|
||||
console.log('adding');
|
||||
this.map.addControl(this.layerControl);
|
||||
}
|
||||
|
||||
watch(showControl, (show) => {
|
||||
if(show) {
|
||||
console.log('adding 2');
|
||||
this.map.addControl(this.layerControl);
|
||||
} else {
|
||||
console.log('removing');
|
||||
this.map.removeControl(this.layerControl);
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user