Maps4HTML / Web-Map-Custom-Element

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/Web-Map-Custom-Element/
Other
54 stars 15 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 3 months ago

prushforth commented 3 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.