From 51666e1678411005bb2d44a3ee64e021e1aa9479 Mon Sep 17 00:00:00 2001 From: Jon Carifio Date: Sat, 14 Oct 2023 00:57:47 -0400 Subject: [PATCH] Allow selection click or double-click as location selection event via a prop. --- common/src/components/LocationSelector.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/components/LocationSelector.vue b/common/src/components/LocationSelector.vue index bef711ed..9b4b4922 100644 --- a/common/src/components/LocationSelector.vue +++ b/common/src/components/LocationSelector.vue @@ -104,6 +104,10 @@ export default defineComponent({ }; } }, + selectionEvent: { + type: String as PropType<'click' | 'dblclick'>, + default: 'click' + }, worldRadii: { type: Boolean, default: false @@ -244,7 +248,7 @@ export default defineComponent({ map.doubleClickZoom.disable(); if (this.selectable) { - map.on('click', this.onMapSelect); + map.on(this.selectionEvent, this.onMapSelect); } map.attributionControl.setPrefix('Leaflet');