fix(canvas): include component-set members in label catalog
This commit is contained in:
parent
ba519c04c0
commit
5b151ffc1e
|
|
@ -25,7 +25,7 @@ interface Viewport {
|
|||
}
|
||||
|
||||
const LABEL_TYPES = new Set(['COMPONENT', 'COMPONENT_SET'])
|
||||
const COMPONENT_LABEL_PARENT_TYPES = new Set(['CANVAS', 'SECTION'])
|
||||
const COMPONENT_LABEL_PARENT_TYPES = new Set(['CANVAS', 'SECTION', 'COMPONENT_SET'])
|
||||
|
||||
function isInViewport(absX: number, absY: number, w: number, h: number, vp: Viewport): boolean {
|
||||
return absX + w >= vp.x && absY + h >= vp.y && absX <= vp.x + vp.w && absY <= vp.y + vp.h
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ test('component labels in component sets are hit-tested above the component boun
|
|||
|
||||
const componentTopY = 80 + (100 + 40) * 2
|
||||
const componentLeftX = 80 + (100 + 20) * 2
|
||||
await expect(page).toHaveScreenshot('component-set-member-label.png', {
|
||||
clip: { x: box.x + componentLeftX, y: box.y + componentTopY - 24, width: 240, height: 24 },
|
||||
maxDiffPixels: 0,
|
||||
threshold: 0
|
||||
})
|
||||
await page.mouse.click(box.x + componentLeftX + 24, box.y + componentTopY - 12)
|
||||
await canvas.waitForRender()
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 831 B |
Loading…
Reference in a new issue