Maps4HTML / MapML.js

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/MapML.js/
Other
56 stars 16 forks source link

Correctly update layer control when moving <map-extent> up/down by re-ordering it among sibling <map-extent>s #956

Open prushforth opened 5 months ago

prushforth commented 5 months ago

Steps to reproduce

Load this experiment Open devtools Elements panel Select / highlight the third \ in the "National Geographic" layer (label="Imagery") In the console drawer, execute this: let imagery = $0 Select / highlight the first \ in the "National Geographic" layer (label="National Geographic") In the console drawer, execute this: $0.insertAdjacentElement('afterend',imagery)

What happens:

The \ is moved to the second DOM position, but it disappears from the layer control altogether.

What should happen:

The \ is moved to the second DOM position, and it should be the second sub-layer in the "National Geographic" layer in the layer control.