Prevent removed markers reapparing after toggling layer visibility
This commit is contained in:
parent
3e095c0ae9
commit
05bf3e8b48
@ -67,7 +67,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
area.remove();
|
props.layerGroup.removeLayer(area);
|
||||||
layers.delete(id);
|
layers.delete(id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
circle.remove();
|
props.layerGroup.removeLayer(circle);
|
||||||
layers.delete(id);
|
layers.delete(id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
line.remove();
|
props.layerGroup.removeLayer(line);
|
||||||
layers.delete(id);
|
layers.delete(id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
marker.remove();
|
props.layerGroup.removeLayer(marker);
|
||||||
layers.delete(id);
|
layers.delete(id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ export default class DynmapLayerGroup extends LayerGroup {
|
|||||||
|
|
||||||
removeLayer(layer: Layer): this {
|
removeLayer(layer: Layer): this {
|
||||||
this._zoomLimitedLayers.delete(layer);
|
this._zoomLimitedLayers.delete(layer);
|
||||||
return super.addLayer(layer);
|
return super.removeLayer(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
update(options: DynmapLayerGroupOptions) {
|
update(options: DynmapLayerGroupOptions) {
|
||||||
|
Loading…
Reference in New Issue
Block a user