diff --git a/test/e2e/workbench.spec.ts b/test/e2e/workbench.spec.ts index 1bb4955..b230788 100644 --- a/test/e2e/workbench.spec.ts +++ b/test/e2e/workbench.spec.ts @@ -115,6 +115,8 @@ test.describe('workbench editing shell', () => { expect(nodeId).toBeTruthy(); await page.goto(`/junction/node/${encodeURIComponent(nodeId!)}`); await expect(page.getByLabel('路口编辑工作区')).toBeVisible(); + await expect(page.getByLabel('道路地图')).toBeVisible(); + expect((await page.getByLabel('道路地图').boundingBox())?.width).toBeGreaterThan(0); await expect(page.getByText(`路口节点 ${nodeId}`)).toBeVisible(); await expect(page.getByText('设施与验证', { exact: true })).toBeVisible(); await expect(page.getByText('当前为浏览模式,开启编辑后可调整路口几何参数')).toBeVisible(); diff --git a/workbench/client/src/styles.css b/workbench/client/src/styles.css index 59e3fd8..8eb9e63 100644 --- a/workbench/client/src/styles.css +++ b/workbench/client/src/styles.css @@ -531,10 +531,13 @@ pre { .form-hint { color: #7b6542; } -/* JunctionTools local workspace overlay. */ +/* JunctionTools keeps the map visible while the contextual editor stays docked. */ .junction-workspace { position: fixed; - inset: 3.5rem 1rem 1rem; + top: 3.5rem; + right: 1rem; + bottom: 1rem; + width: min(430px, calc(100vw - 2rem)); z-index: 20; overflow: auto; background: var(--panel, #fff); @@ -592,3 +595,13 @@ pre { background: #f8fafc; color: #475569; } +@media (max-width: 900px) { + .junction-workspace { + top: auto; + right: 0.5rem; + bottom: 0.5rem; + left: 0.5rem; + width: auto; + max-height: 68vh; + } +}