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;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
area.closePopup();
|
||||||
area.unbindPopup();
|
area.unbindPopup();
|
||||||
area.bindPopup(() => createPopup(options));
|
area.bindPopup(() => createPopup(options));
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ export const updateCircle = (circle: DynmapPolyline | DynmapPolygon | undefined,
|
|||||||
return createCircle(options, converter);
|
return createCircle(options, converter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
circle.closePopup();
|
||||||
circle.unbindPopup();
|
circle.unbindPopup();
|
||||||
circle.bindPopup(() => createPopup(options));
|
circle.bindPopup(() => createPopup(options));
|
||||||
circle.setStyle(options.style);
|
circle.setStyle(options.style);
|
||||||
|
@ -43,6 +43,7 @@ export const updateLine = (line: DynmapPolyline | undefined, options: DynmapLine
|
|||||||
return createLine(options, converter);
|
return createLine(options, converter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
line.closePopup();
|
||||||
line.unbindPopup();
|
line.unbindPopup();
|
||||||
line.bindPopup(() => createPopup(options));
|
line.bindPopup(() => createPopup(options));
|
||||||
line.setStyle(options.style);
|
line.setStyle(options.style);
|
||||||
|
@ -67,6 +67,7 @@ export const updateMarker = (marker: Marker | undefined, options: DynmapMarker,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
marker.closePopup();
|
||||||
marker.unbindPopup();
|
marker.unbindPopup();
|
||||||
|
|
||||||
if(options.popupContent) {
|
if(options.popupContent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user