Skip to content

Commit

Permalink
Merge pull request #288 from Carifio24/location-selection-event
Browse files Browse the repository at this point in the history
Allow setting location select event via prop
  • Loading branch information
patudom authored Jan 9, 2024
2 parents ba68b66 + 51666e1 commit 3855c12
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 @@ -110,6 +110,10 @@ export default defineComponent({
};
}
},
selectionEvent: {
type: String as PropType<'click' | 'dblclick'>,
default: 'click'
},
worldRadii: {
type: Boolean,
default: false
Expand Down Expand Up @@ -255,7 +259,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 3855c12

Please sign in to comment.