feat(manager): the floor plan editor reworked; Management -> Tables on the page rule; area colours
- Floor editor: one toolbar over the map and the panels (grid on / off, grid resolution Ultra high ... Very low, edit the shape, Fit width / Whole plan, undo, save), panels top-aligned and sticky. - The floor's shape: a '+' on the edge under the pointer, press to add a corner (and drag it); resting on a corner shows a bubble to remove it (never below 3). - Areas: resize handles on the sides and corners, a colour (pastel, see-through; floor_items.color, migration 0041), the name repeated in the corner when tables cover it (live maps too). - Labels can be clicked again after they're placed (transparent fill, not none). - Management -> Tables: <Page> with the tabs above (?tab=), the list as a container, toolbar buttons one height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-6
@@ -1122,14 +1122,18 @@ try {
|
||||
await page.mouse.up()
|
||||
// an irregular floor: a corner more, pulled in
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
await page.getByTestId('floor-corner').nth(1).click()
|
||||
await page.getByTestId('floor-corner-add').click()
|
||||
await page.getByTestId('floor-corner').nth(2).scrollIntoViewIfNeeded()
|
||||
const corner = await page.getByTestId('floor-corner').nth(2).boundingBox()
|
||||
await page.mouse.move(corner.x + corner.width / 2, corner.y + corner.height / 2)
|
||||
// 2026-11-20: a "+" shows on the edge under the pointer; pressing there adds a corner and drags it
|
||||
const c1 = await page.getByTestId('floor-corner').nth(1).boundingBox()
|
||||
const c2 = await page.getByTestId('floor-corner').nth(2).boundingBox()
|
||||
const mid = { x: (c1.x + c1.width / 2 + c2.x + c2.width / 2) / 2, y: (c1.y + c1.height / 2 + c2.y + c2.height / 2) / 2 }
|
||||
await page.mouse.move(mid.x, mid.y - 3)
|
||||
await page.mouse.move(mid.x, mid.y, { steps: 2 })
|
||||
await page.getByTestId('floor-edge-add').waitFor({ timeout: 3000 }).catch(() => {})
|
||||
r.check('floor: a "+" shows on the floor's edge under the pointer', await page.getByTestId('floor-edge-add').count() === 1)
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(corner.x - 120, corner.y + 10, { steps: 6 })
|
||||
await page.mouse.move(mid.x - 120, mid.y + 10, { steps: 6 })
|
||||
await page.mouse.up()
|
||||
r.check('floor: pressing on the edge added a corner (5)', await page.getByTestId('floor-corner').count() === 5)
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
await page.screenshot({ path: path.join(OUT, 'manager-floor-editor.png') })
|
||||
await page.getByTestId('floor-save').click()
|
||||
|
||||
Reference in New Issue
Block a user