fix: fix startMarker/Polyline/Polygon on right click (#2403)

fix #2392
This commit is contained in:
Yohan Boniface 2024-12-26 11:02:48 +01:00 committed by GitHub
commit 48ae4123ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -349,19 +349,19 @@ export default class Umap extends ServerStored {
if (this.properties.enableMarkerDraw) { if (this.properties.enableMarkerDraw) {
items.push({ items.push({
label: this.help.displayLabel('DRAW_MARKER'), label: this.help.displayLabel('DRAW_MARKER'),
action: () => this._leafletMap.startMarker(event), action: () => this._leafletMap.editTools.startMarker(),
}) })
} }
if (this.properties.enablePolylineDraw) { if (this.properties.enablePolylineDraw) {
items.push({ items.push({
label: this.help.displayLabel('DRAW_POLYGON'), label: this.help.displayLabel('DRAW_POLYGON'),
action: () => this._leafletMap.startPolygon(event), action: () => this._leafletMap.editTools.startPolygon(),
}) })
} }
if (this.properties.enablePolygonDraw) { if (this.properties.enablePolygonDraw) {
items.push({ items.push({
label: this.help.displayLabel('DRAW_LINE'), label: this.help.displayLabel('DRAW_LINE'),
action: () => this._leafletMap.startPolyline(event), action: () => this._leafletMap.editTools.startPolyline(),
}) })
} }
items.push('-') items.push('-')