Skip to content

Commit

Permalink
feat: Selecting features should not clean probe (closes #944)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 4, 2024
1 parent 023e60b commit e873805
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion map/client/composables/probe.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ export function useProbe (name, options = {}) {
let lastClickedPosition
function onClicked (layer, event) {
if (!isProbing()) {
if (get('item')) clearProbe()
if (get('item')) {
const feature = _.get(event, 'target.feature')
// If not clicking directly on the map we don't cancel last probe, eg feature selection
if (!feature) clearProbe()
}
return
}
// FIXME: For some layers, eg based on path, we get a first click with the layer as target
Expand Down

0 comments on commit e873805

Please sign in to comment.