Close context menu on map interactions

This commit is contained in:
James Lyne 2021-05-24 21:07:31 +01:00
parent 19b6c8e98d
commit 47d0b1e675

View File

@ -124,6 +124,9 @@ export default defineComponent({
window.removeEventListener('keyup', handleEsc);
});
props.leaflet.on('movestart', closeContextMenu);
props.leaflet.on('zoomstart', closeContextMenu);
props.leaflet.on('contextmenu', (e: LeafletMouseEvent) => {
e.originalEvent.stopImmediatePropagation();
e.originalEvent.preventDefault();