feat(junction): enable complex carriageway width editing

This commit is contained in:
que01 committed 2026-09-08 12:09:44 +08:00
1 parent 56647fcdaa
commit c4bcbe8ff9
22 files changed
+449 -52

No files matched your search

+14 -1
View File
@@ -256,7 +256,9 @@ one. `handle.constraintId` — present only when a constraint exists — is also
- [ ] Constraints sent with their operations
- [ ] No geometry or OL reads inside a `setState` updater
- [ ] No per-`pointermove` React state updates
- [ ] Flag off ⇒ no sources, no layers, no interactions, no requests
- [ ] Flag off ⇒ no sources, layers, or interactions. A selected complex
JunctionTools workspace may request its scoped manifest solely to discover
server-published edit capability before the edit switch is enabled.
- [ ] Every input channel meets at the shared exits, not a parallel path
- [ ] Displayed bounds round inward, so an offered extreme is accepted
- [ ] A focused field is not rewritten by an arriving preview
@@ -279,6 +281,17 @@ reuse the unscoped singular structure when its ref differs. A missing structure
stays unavailable. Use `junctionEditSelection(ref)` for edit-state and preview
requests so a cluster never falls back to the last selected road or node.
## 17. Complex carriageway width editing
Complex JunctionTools consumes the same v2 `EditSession`, `PreviewRequester`,
`ParameterPanel`, and map handle callbacks as ordinary junctions. The only
editable handle in this stage is `cluster-carriageway-width` with a
`cluster-carriageway` anchor. Before edit mode, a selected cluster loads its
scoped manifest so `canEditJunction()` can use an editable server handle as the
capability signal. Once enabled, those same handles are rendered on the map and
in the panel; `App.tsx` resolves the anchor snapshot from `sourceRoadIds[0]`.
Do not add a cluster-local draft, preview, undo, or save flow.
Compiler structure provenance supplies cluster hotspots and external road IDs.
`localJunctionState` and `localJunctionPreview` recognize explicit `junction_key`
(and legacy `cluster_id`) before testing node/road references. This keeps core