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

+5
View File
@@ -58,5 +58,10 @@ export function junctionLabelForHandle(handle: EditHandle, roads: Road[], juncti
const road = roadForKey(roads, handle.anchor.roadId) ?? roadForKey(roads, handle.anchor.segmentId);
return `${approachName(road, roads, junction)} · ${base}`;
}
const clusterAnchor = handle.anchor;
if (handle.kind === 'cluster-carriageway-width' && clusterAnchor.type === 'cluster-carriageway') {
const road = roads.find((item) => clusterAnchor.sourceRoadIds.includes(item.id));
return `${approachName(road, roads, junction)} · ${base}`;
}
return base;
}