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) {
items.push({
label: this.help.displayLabel('DRAW_MARKER'),
action: () => this._leafletMap.startMarker(event),
action: () => this._leafletMap.editTools.startMarker(),
})
}
if (this.properties.enablePolylineDraw) {
items.push({
label: this.help.displayLabel('DRAW_POLYGON'),
action: () => this._leafletMap.startPolygon(event),
action: () => this._leafletMap.editTools.startPolygon(),
})
}
if (this.properties.enablePolygonDraw) {
items.push({
label: this.help.displayLabel('DRAW_LINE'),
action: () => this._leafletMap.startPolyline(event),
action: () => this._leafletMap.editTools.startPolyline(),
})
}
items.push('-')