Prevent removed markers reapparing after toggling layer visibility

This commit is contained in:
James Lyne 2020-12-23 18:02:10 +00:00
parent 3e095c0ae9
commit 05bf3e8b48
5 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,7 @@ export default defineComponent({
return;
}
area.remove();
props.layerGroup.removeLayer(area);
layers.delete(id);
},

View File

@ -67,7 +67,7 @@ export default defineComponent({
return;
}
circle.remove();
props.layerGroup.removeLayer(circle);
layers.delete(id);
},

View File

@ -66,7 +66,7 @@ export default defineComponent({
return;
}
line.remove();
props.layerGroup.removeLayer(line);
layers.delete(id);
},

View File

@ -65,7 +65,7 @@ export default defineComponent({
return;
}
marker.remove();
props.layerGroup.removeLayer(marker);
layers.delete(id);
},

View File

@ -103,7 +103,7 @@ export default class DynmapLayerGroup extends LayerGroup {
removeLayer(layer: Layer): this {
this._zoomLimitedLayers.delete(layer);
return super.addLayer(layer);
return super.removeLayer(layer);
}
update(options: DynmapLayerGroupOptions) {