Skip to content

Commit

Permalink
fix: make highlight non interactive to allow multi-unselection to wor…
Browse files Browse the repository at this point in the history
…k correctly
  • Loading branch information
claustres committed Aug 28, 2024
1 parent 3c4af9e commit 38bd985
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions map/client/composables/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getFeatureId, getFeatureStyleType, isLayerHighlightable } from '../util
import * as composables from '../../../core/client/composables/index.js'

export const HighlightsLayerName = uid()
// This ensure it is on tp of everything else
// This ensure it is on top of everything else
export const HighlightsZIndex = 999

export function useHighlight (name, options = {}) {
Expand Down Expand Up @@ -157,7 +157,8 @@ export function useHighlight (name, options = {}) {
cluster: false,
removeMissing: true,
popup: { pick: [] },
zIndex: HighlightsZIndex
zIndex: HighlightsZIndex,
interactive: false
},
cesium: {
type: 'geoJson',
Expand Down
2 changes: 2 additions & 0 deletions map/client/leaflet/utils/utils.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ function processStyle (style, feature, options, mappings) {
// We manage panes for z-index, so we need to forward it to marker options (only if not already defined)
if (leafletOptions.pane && !_.has(style, `style.${type}.pane`)) _.set(style, `style.${type}.pane`, leafletOptions.pane)
if (leafletOptions.shadowPane && !_.has(style, `style.${type}.shadowPane`)) _.set(style, `style.${type}.shadowPane`, leafletOptions.shadowPane)
// Similarly forward interactive option from layer if any
if (_.has(leafletOptions, 'interactive') && !_.has(style, `style.${type}.interactive`)) _.set(style, `style.${type}.interactive`, leafletOptions.interactive)
return style
}

Expand Down

0 comments on commit 38bd985

Please sign in to comment.