Fix newly created markers/shapes not being added to the map
This commit is contained in:
parent
cad535365b
commit
fd26eee713
@ -80,7 +80,13 @@ export default defineComponent({
|
|||||||
if(update.removed) {
|
if(update.removed) {
|
||||||
deleteArea(update.id);
|
deleteArea(update.id);
|
||||||
} else {
|
} else {
|
||||||
layers.set(update.id, updateArea(layers.get(update.id), update.payload as DynmapArea, converter));
|
const layer = updateArea(layers.get(update.id), update.payload as DynmapArea, converter)
|
||||||
|
|
||||||
|
if(!layers.has(update.id)) {
|
||||||
|
props.layerGroup.addLayer(layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
layers.set(update.id, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,9 +83,10 @@ export default defineComponent({
|
|||||||
const layer = updateCircle(layers.get(update.id), update.payload as DynmapCircle, converter)
|
const layer = updateCircle(layers.get(update.id), update.payload as DynmapCircle, converter)
|
||||||
|
|
||||||
if(!layers.has(update.id)) {
|
if(!layers.has(update.id)) {
|
||||||
layers.set(update.id, layer);
|
|
||||||
props.layerGroup.addLayer(layer);
|
props.layerGroup.addLayer(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
layers.set(update.id, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,9 +83,10 @@ export default defineComponent({
|
|||||||
const layer = updateLine(layers.get(update.id), update.payload as DynmapLine, converter)
|
const layer = updateLine(layers.get(update.id), update.payload as DynmapLine, converter)
|
||||||
|
|
||||||
if(!layers.has(update.id)) {
|
if(!layers.has(update.id)) {
|
||||||
layers.set(update.id, layer);
|
|
||||||
props.layerGroup.addLayer(layer);
|
props.layerGroup.addLayer(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
layers.set(update.id, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,13 @@ export default defineComponent({
|
|||||||
if(update.removed) {
|
if(update.removed) {
|
||||||
deleteMarker(update.id);
|
deleteMarker(update.id);
|
||||||
} else {
|
} else {
|
||||||
layers.set(update.id, updateMarker(layers.get(update.id), update.payload as DynmapMarker, projection));
|
const layer = updateMarker(layers.get(update.id), update.payload as DynmapMarker, projection);
|
||||||
|
|
||||||
|
if(!layers.has(update.id)) {
|
||||||
|
props.layerGroup.addLayer(layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
layers.set(update.id, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user