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

@@ -82,7 +82,14 @@ export function JunctionWorkspace({
onSignalStatus,
onUpdateSignal,
}: Props) {
const editable = useMemo(() => canEditJunction(descriptor), [descriptor]);
const editable = useMemo(
() =>
canEditJunction(
descriptor,
handles.some((handle) => handle.editable),
),
[descriptor, handles],
);
const complexEnabled = useMemo(() => {
const nodes = new Set(descriptor.nodeIds.map(String));
return Boolean(
@@ -187,7 +194,11 @@ export function JunctionWorkspace({
</div>
<p>
{complexEnabled
? '当前按复杂路口渲染'
? editable
? editMode
? '可编辑外部车行道宽度'
: '当前按复杂路口渲染,开启编辑后可调整外部车行道宽度'
: '当前按复杂路口渲染'
: descriptor.status === 'candidate'
? '当前按普通路口渲染,可切换为复杂路口'
: editable
@@ -505,9 +516,7 @@ export function JunctionWorkspace({
</div>
</>
) : editable ? (
<p className="junction-workspace__browse-hint">
开启编辑模式后,这里会显示进口宽度、进口收口距离和角部圆角控件。
</p>
<p className="junction-workspace__browse-hint">开启编辑模式后,这里会显示可调整的路口几何参数。</p>
) : complexEnabled ? (
<p className="junction-workspace__browse-hint">复杂路口几何已启用;首版仅支持查看,不支持参数拖拽编辑。</p>
) : null}