fix: hide handles for unavailable junction structures
This commit is contained in:
1 parent
2b79085042
commit
f40caaa264
4 files changed
+24
-4
No files matched your search
+6
-2
@@ -411,6 +411,8 @@ function editState(area, selection = null) {
|
||||
},
|
||||
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
||||
});
|
||||
const handles =
|
||||
selection?.type === 'cluster' && !junctionStructure ? { ...resolution.handles, handles: [] } : resolution.handles;
|
||||
return {
|
||||
active: true,
|
||||
areaId: area.id,
|
||||
@@ -419,7 +421,7 @@ function editState(area, selection = null) {
|
||||
document: directEdits,
|
||||
constraintStates: resolution.constraintStates,
|
||||
diagnostics: resolution.diagnostics,
|
||||
handles: resolution.handles,
|
||||
handles,
|
||||
junctionStructure,
|
||||
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
||||
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
||||
@@ -466,6 +468,8 @@ function editPreview(area, body = {}) {
|
||||
},
|
||||
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
||||
});
|
||||
const handles =
|
||||
selection?.type === 'cluster' && !junctionStructure ? { ...resolution.handles, handles: [] } : resolution.handles;
|
||||
const degraded = Date.now() - startedAt > 300;
|
||||
return {
|
||||
ok: true,
|
||||
@@ -475,7 +479,7 @@ function editPreview(area, body = {}) {
|
||||
documentVersion: activeEdits.documentVersion,
|
||||
constraintStates: resolution.constraintStates,
|
||||
diagnostics,
|
||||
handles: resolution.handles,
|
||||
handles,
|
||||
junctionStructure,
|
||||
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
||||
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
||||
|
||||
Reference in new issue
Block a user