nismod / irv-frontend

IRV frontend
MIT License
1 stars 0 forks source link

Hovered features are not surfaced above surrounding features #14

Open mz8i opened 2 years ago

mz8i commented 2 years ago

When hovering over a map feature, e.g. a power line, the feature is highlighted but it's ordering in relation to neighbouring features stays the same. As a result, if there are any features that overlap with the highlighted one, part of the feature might not be visible when hovering

Other libraries like Leaflet have an option such as riseOnHover - need to investigate how to achieve this mechanism with Deck.GL

tomalrussell commented 2 years ago

Is this closed after nismod/infra-risk-vis#35 or still an issue?

mz8i commented 2 years ago

Separate issue, as the hover highlight relies on deck.gl's autoHighlight.

See example using power lines:

hovered: Screenshot_20220203_184957

selected: Screenshot_20220203_185104

Whether it's a priority is another topic!

mz8i commented 2 years ago

With some more work, the new mechanism we're using for selection highlight could be used for hover highlight, too. This would eliminate the above problem.

But performance might be an issue then, as the selection layer needs to run some computation on all visible features, whenever the selected feature changes. If that had to happen every time the hovered feature changes, we could run into performance issues. Conversely, the built in autoHighlight mechanism is much simpler to ensure performance