feat(map): added coordinates copy feature

This commit is contained in:
MarcoJayUsai
2025-03-22 12:33:34 +01:00
parent d35e6063e7
commit 45f828c838
7 changed files with 182 additions and 177 deletions

View File

@@ -49,6 +49,7 @@ import {
ConfigLoadedEvent,
ContextActionChangedEvent,
ContextActionSetChangedEvent,
CoordinatesFreezeEvent,
HiddenTypesChangedEvent,
MapContextMenuRequestEvent,
MapOptionsChangedEvent,
@@ -509,7 +510,7 @@ export class Map extends L.Map {
code: "ShiftLeft",
altKey: false,
ctrlKey: false,
});
})
}
setLayerName(layerName: string) {
@@ -1031,6 +1032,7 @@ export class Map extends L.Map {
}
#onLeftShortClick(e: L.LeafletMouseEvent) {
CoordinatesFreezeEvent.dispatch();
if (Date.now() - this.#leftMouseDownEpoch < SHORT_PRESS_MILLISECONDS) {
this.#debounceTimeout = window.setTimeout(() => {
if (!this.#isSelecting) {