feat(workbench): stabilize junction tools workspace

This commit is contained in:
que01 committed 2026-09-04 09:46:19 +08:00
1 parent e6b822416d
commit f10a5da325
22 files changed
+1078 -53

No files matched your search

+24
View File
@@ -122,6 +122,11 @@ assert.notEqual(
stopLineHandle.axisAzimuth,
'crosswalk inset and stop-line offset use opposite positive directions along the approach',
);
assert.equal(
(crosswalkHandle.axisAzimuth + 180) % 360,
stopLineHandle.axisAzimuth,
'increasing crosswalk inset moves toward the junction while increasing stop-line offset moves away',
);
// A selection scopes the manifest to the object being edited. The whole-area
// manifest is 844 KB on a 41-road workspace, 89% of it `affects` id lists, while
@@ -324,6 +329,25 @@ assert.equal(allKindsResolution.junctionPlans.get('junction').approaches['segmen
assert.equal(allKindsResolution.junctionPlans.get('junction').approaches['segment:a'].cutbackMeters, 2);
assert.equal(allKindsResolution.junctionPlans.get('junction').corners['segment:a->segment:b'], 4);
assert.equal(allKindsResolution.effectiveJunctionPlans.get('node:junction').approaches['segment:a'].widthMeters, 7);
const independentCorners = resolveDirectEditConstraints(
junctionModel,
document([
constraint({
id: 'corner-radius-a',
kind: 'junction-corner-radius',
anchor: { type: 'junction-corner', nodeId: 'junction', incomingRoadId: 'segment:a', outgoingRoadId: 'segment:b' },
value: { radiusMeters: 4 },
}),
constraint({
id: 'corner-radius-b',
kind: 'junction-corner-radius',
anchor: { type: 'junction-corner', nodeId: 'junction', incomingRoadId: 'segment:b', outgoingRoadId: 'segment:c' },
value: { radiusMeters: 10 },
}),
]),
);
assert.equal(independentCorners.junctionPlans.get('junction').corners['segment:a->segment:b'], 4);
assert.equal(independentCorners.junctionPlans.get('junction').corners['segment:b->segment:c'], 10);
const clusterResolution = resolveDirectEditConstraints(junctionModel, document(allKinds), {
junctionClusters: [{ id: 'cluster-1', nodeIds: ['junction'] }],