Fixed error preventing operation on touch screen for position actions

This commit is contained in:
Davide Passoni 2024-08-08 15:39:38 +02:00
parent 6fdfb194a6
commit 19b0eeeffd

View File

@ -880,7 +880,7 @@ export class Map extends L.Map {
}
}
} else if (this.#state === CONTEXT_ACTION) {
if (e.originalEvent.buttons === 1) {
if (e.type === 'touchstart' || e.originalEvent.buttons === 1) {
if (this.#contextAction !== null) this.executeContextAction(null, pressLocation);
else this.setState(IDLE);
} else if (e.originalEvent.buttons === 2) {