Sync tile overlay state via Yjs across participants
OverlaySync component listens to Leaflet overlayadd/overlayremove events and writes enabled overlay IDs to Yjs routeData. On connect, loads initial overlay state from Yjs. LayersControl.Overlay uses checked prop to reflect the synced state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bf964e07fc
commit
e158205f32
2 changed files with 62 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
## 2. Overlay State Sync
|
||||
|
||||
- [ ] 2.1 Add `overlays` string array to Yjs `routeOptions` Y.Map for enabled tile overlay IDs (deferred — tile overlays are visual-only)
|
||||
- [x] 2.1 Add `overlays` string array to Yjs `routeOptions` Y.Map for enabled tile overlay IDs
|
||||
- [x] 2.2 Add `poiCategories` string array to Yjs `routeOptions` Y.Map for enabled POI category IDs
|
||||
- [x] 2.3 Sync LayersControl state with Yjs — toggling overlay updates Yjs, Yjs changes toggle layers
|
||||
- [x] 2.4 Include overlay state in crash recovery localStorage snapshot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue