Close existing popups during updates
This commit is contained in:
parent
746a3d0eb0
commit
a966812f1a
@ -64,6 +64,7 @@ export const updateArea = (area: DynmapPolyline | DynmapPolygon | undefined, opt
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
area.closePopup();
|
||||
area.unbindPopup();
|
||||
area.bindPopup(() => createPopup(options));
|
||||
|
||||
|
@ -50,6 +50,7 @@ export const updateCircle = (circle: DynmapPolyline | DynmapPolygon | undefined,
|
||||
return createCircle(options, converter);
|
||||
}
|
||||
|
||||
circle.closePopup();
|
||||
circle.unbindPopup();
|
||||
circle.bindPopup(() => createPopup(options));
|
||||
circle.setStyle(options.style);
|
||||
|
@ -43,6 +43,7 @@ export const updateLine = (line: DynmapPolyline | undefined, options: DynmapLine
|
||||
return createLine(options, converter);
|
||||
}
|
||||
|
||||
line.closePopup();
|
||||
line.unbindPopup();
|
||||
line.bindPopup(() => createPopup(options));
|
||||
line.setStyle(options.style);
|
||||
|
@ -67,6 +67,7 @@ export const updateMarker = (marker: Marker | undefined, options: DynmapMarker,
|
||||
}
|
||||
}
|
||||
|
||||
marker.closePopup();
|
||||
marker.unbindPopup();
|
||||
|
||||
if(options.popupContent) {
|
||||
|
Loading…
Reference in New Issue
Block a user