3 Commits (9b6c7ca598b21d0f3b26ccf4b1ccb5e1151737ef)

Author SHA1 Message Date
Buddy 0855851504 docs: document leaflet-control-layers component and active attribute 3 months ago
Buddy eba6b2e6ad refactor: use type="base" instead of slot="base" for control-layers
slot is a reserved HTML global attribute with shadow-DOM semantics;
using it was misleading even though it happened to work. Switch to
type="base" / type="overlay", which is conventional and carries no
side effects.
3 months ago
Buddy e45162b0be feat: add leaflet-control-layers component
New <leaflet-control-layers> wraps Control.Layers. Children with
slot="base" or slot="overlay" and a name attribute are automatically
registered as base layers or overlays. The control intercepts child
leaflet-register events and stops propagation so layers are managed
by the layers control rather than added directly to the map.

Unchecked layers that connected before the control are removed from
the map before the control initialises, so Control.Layers._addItem
correctly reflects the unchecked state on first render.
3 months ago