2 Commits (c339ce1d0628e736e83b676eaccd6bd26c074260)

Author SHA1 Message Date
Buddy 35190bacc5 feat: split leaflet-icon into image Icon and DivIcon, event-only marker↔icon handshake
- Strip leaflet-icon.ts to image-only (new Icon(), remove div/html/bgPos)
- Create leaflet-div-icon.ts with DivIcon, innerHTML content, MutationObserver
- Convert marker↔icon from querySelector to event-only protocol:
  marker iterates children dispatching leaflet-request-icon on each,
  icons listen on themselves and respond with icon-changed
- Extract emitIconChanged() helper into register.ts to eliminate
  repeated CustomEvent construction across both icon components
- Type icon-changed and leaflet-request-icon in HTMLElementEventMap
- Update marker's #onIconChanged to use typed event instead of cast
- Export LeafletDivIcon from index.ts
- Add DivIcon demo markers to custom-icon.html and index.html
3 months ago
Buddy f64b4e70de feat: add leaflet-icon component for custom marker icons
New <leaflet-icon> element wraps L.Icon / L.DivIcon and dispatches
icon-changed custom events to parent markers. Marker listens for
the event and queries for existing icon children on connect.

Fix: use kebab-case attribute names (via PROPS table spec.attr) in
applyIcon() instead of camelCase, and guard against empty iconUrl
to avoid L.icon({}) throwing.
3 months ago