feat(junction): enable complex carriageway width editing
This commit is contained in:
1 parent
56647fcdaa
commit
c4bcbe8ff9
22 files changed
+449
-52
No files matched your search
@@ -10,7 +10,7 @@ It is required because the feature crosses compiler, storage, and HTTP layers.
|
||||
|
||||
```js
|
||||
resolveDirectEditConstraints(model, editDocument, context)
|
||||
// -> { roadProfiles, junctionPlans, constraintStates, handles, diagnostics }
|
||||
// -> { roadProfiles, junctionPlans, clusterPlans, constraintStates, handles, diagnostics }
|
||||
|
||||
GET /api/edit-state
|
||||
POST /api/edit-preview
|
||||
@@ -316,7 +316,17 @@ then `structureFromTopology(topology, shape, center, features)`. Projection is
|
||||
`cluster:<id>`. The legacy singular field is null at this unscoped entry point.
|
||||
- `GET /api/edit-state?junction=<node>` preserves the node selection contract;
|
||||
`?cluster=<id>` selects a cluster. Preview uses the equivalent `selection`
|
||||
object. Cluster handle manifests are empty until a future writable contract.
|
||||
object. A selected editable cluster publishes only `cluster-carriageway-width`
|
||||
handles for its external carriageways.
|
||||
- A `cluster-carriageway-width` anchor contains `clusterId`, stable
|
||||
`carriagewayKey`, `sourceNodeIds`, and `sourceRoadIds`. Replay matches all
|
||||
source identity; a missing or changed source is stale with `anchor-missing`.
|
||||
The solver stores accepted values in `clusterPlans`, and `compileGeometry()`
|
||||
applies them to the matching complex-junction approach before geometry is
|
||||
generated. It must not widen unrelated member-node approaches.
|
||||
- Preview and save both evaluate the same candidate through the resolver and
|
||||
`compileGeometry()`. Save rejects every `severity: error` diagnostic before
|
||||
writing the edit document.
|
||||
- Complex road-surface features carry `junction_key`, `object_key` and relevant
|
||||
`arm_key`, `carriageway_key`, `corner_key`. Core (or the first remaining
|
||||
approach when the core fails) carries `junction_structure` for persisted reads.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "cj-02-width",
|
||||
"title": "复杂路口 02:宽度编辑端到端闭环",
|
||||
"description": "完成第一条可用的复杂路口宽度编辑链路,让用户能看到真实几何变化并保存保留。",
|
||||
"status": "planning",
|
||||
"status": "in_progress",
|
||||
"dev_type": "fullstack",
|
||||
"scope": "junction",
|
||||
"package": null,
|
||||
@@ -32,4 +32,4 @@
|
||||
],
|
||||
"notes": "依赖:01 验收通过。规划已补齐,等待最终评审后启动;不表示实现已完成。",
|
||||
"meta": {}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user