fix(workbench): clarify junction browse mode
This commit is contained in:
1 parent
39d7453ebc
commit
c9d9e45f48
4 files changed
+38
-4
No files matched your search
@@ -1049,6 +1049,8 @@ function App() {
|
||||
setStatus((error as Error).message);
|
||||
}
|
||||
}}
|
||||
editMode={editMode}
|
||||
onEnableEdit={() => setEditMode(true)}
|
||||
handles={junctionHandles}
|
||||
onDraft={draftValue}
|
||||
onSettle={(handle, value) => {
|
||||
|
||||
@@ -14,6 +14,8 @@ interface Props {
|
||||
onApply: () => void;
|
||||
onDiscard: () => void;
|
||||
onSave: () => void;
|
||||
editMode?: boolean;
|
||||
onEnableEdit?: () => void;
|
||||
handles?: EditHandle[];
|
||||
onDraft?: (handle: EditHandle, value: number) => void;
|
||||
onSettle?: (handle: EditHandle, value: number) => void;
|
||||
@@ -28,6 +30,8 @@ export function JunctionWorkspace({
|
||||
onApply,
|
||||
onDiscard,
|
||||
onSave,
|
||||
editMode = false,
|
||||
onEnableEdit,
|
||||
diagnostics = [],
|
||||
facilitySummary = { crosswalks: 0, stopLines: 0, signals: 0 },
|
||||
handles = [],
|
||||
@@ -45,9 +49,18 @@ export function JunctionWorkspace({
|
||||
<h2>
|
||||
{descriptor.ref.type === 'node' ? '路口节点' : '复杂路口上下文'} {descriptor.ref.id}
|
||||
</h2>
|
||||
<p>{editable ? '可编辑路口几何参数' : '只读上下文:当前路口类型暂不支持编辑'}</p>
|
||||
<p>
|
||||
{editable
|
||||
? editMode
|
||||
? '可编辑路口几何参数'
|
||||
: '当前为浏览模式,开启编辑后可调整路口几何参数'
|
||||
: '只读上下文:当前路口类型暂不支持编辑'}
|
||||
</p>
|
||||
</div>
|
||||
<div className="junction-workspace__header-actions">
|
||||
{editable && !editMode ? <Button onClick={onEnableEdit}>开启编辑模式</Button> : null}
|
||||
<Button onClick={onClose}>返回主地图</Button>
|
||||
</div>
|
||||
<Button onClick={onClose}>返回主地图</Button>
|
||||
</header>
|
||||
<div className="junction-workspace__body">
|
||||
<dl>
|
||||
@@ -80,7 +93,7 @@ export function JunctionWorkspace({
|
||||
<p>当前路口没有诊断问题。</p>
|
||||
)}
|
||||
</section>
|
||||
{editable ? (
|
||||
{editable && editMode ? (
|
||||
<>
|
||||
<ParameterPanel
|
||||
handles={handles}
|
||||
@@ -102,6 +115,10 @@ export function JunctionWorkspace({
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
) : editable ? (
|
||||
<p className="junction-workspace__browse-hint">
|
||||
开启编辑模式后,这里会显示进口宽度、cutback 和角部圆角控件。
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -549,6 +549,12 @@ pre {
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
.junction-workspace__header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.junction-workspace__header h2 {
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
@@ -579,3 +585,10 @@ pre {
|
||||
gap: 0.5rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
.junction-workspace__browse-hint {
|
||||
margin: 1.5rem 0 0;
|
||||
padding: 0.75rem 1rem;
|
||||
border-left: 3px solid #94a3b8;
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
}
|
||||
Reference in new issue
Block a user