mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: Context menu shown when dragging handles
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DivIcon, LatLng } from "leaflet";
|
||||
import { DivIcon, DomEvent, LatLng } from "leaflet";
|
||||
import { CustomMarker } from "../markers/custommarker";
|
||||
|
||||
export class DraggableHandle extends CustomMarker {
|
||||
@@ -8,6 +8,22 @@ export class DraggableHandle extends CustomMarker {
|
||||
this.on("add", (e) => {
|
||||
this.getElement()?.addEventListener("touchstart", (e) => e.stopPropagation());
|
||||
});
|
||||
|
||||
this.on("mousedown", (e) => {
|
||||
DomEvent.stopPropagation(e);
|
||||
});
|
||||
|
||||
this.on("mouseup", (e) => {
|
||||
DomEvent.stopPropagation(e);
|
||||
});
|
||||
|
||||
this.on("dragstart", (e) => {
|
||||
DomEvent.stopPropagation(e);
|
||||
});
|
||||
|
||||
this.on("dragend", (e) => {
|
||||
DomEvent.stopPropagation(e);
|
||||
});
|
||||
}
|
||||
|
||||
createIcon() {
|
||||
|
||||
Reference in New Issue
Block a user