Web-Map-Custom-Element icon indicating copy to clipboard operation
Web-Map-Custom-Element copied to clipboard

Fix feature outline on hover

Open AliyanH opened this issue 1 year ago • 1 comments

When you hover over the features on the map given below, the outline in some places does not show properly due to overlap, we can get around this with messing with Z-index or dom order for the outline as required to show the outline at the top of DOM order at all times.

https://maps4html.org/experiments/api/geojson/

AliyanH avatar Feb 13 '24 21:02 AliyanH

this issue is related to #940.

It appears SVG doesn't directly support z-index like CSS does (link). I played around by moving the hovered element to the end of its parent container. Since SVGs render the last element in the markup on top, and this seems to solve the issue, but may present another issue when features overlap. For discussion.

AliyanH avatar Mar 18 '24 23:03 AliyanH