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
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user