fix: fix startMarker/Polyline/Polygon on right click

fix #2392
This commit is contained in:
Yohan Boniface 2024-12-25 19:32:49 +01:00
parent 52785e22ad
commit ed33b1611a

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('-')