Skip to content

Commit

Permalink
Allow selection click or double-click as location selection event via…
Browse files Browse the repository at this point in the history
… a prop.
  • Loading branch information
Carifio24 committed Oct 14, 2023
1 parent 467e844 commit 51666e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/src/components/LocationSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export default defineComponent({
};
}
},
selectionEvent: {
type: String as PropType<'click' | 'dblclick'>,
default: 'click'
},
worldRadii: {
type: Boolean,
default: false
Expand Down Expand Up @@ -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('<a href="https://leafletjs.com" title="A JavaScript library for interactive maps" target="_blank" rel="noopener noreferrer" >Leaflet</a>');
Expand Down

0 comments on commit 51666e1

Please sign in to comment.