openpencil/packages/scene-graph/tests/basic
Danila Poyarkov 24db186ac8
feat: select layers at Figma's click depth (#900)
* feat: select layers at Figma's click depth

Checked against Figma desktop 126 with the same pointer input in both
editors. A click walks from the page down to the deepest layer under the
cursor and stops at the first layer that is not open: top-level frames
(on the page or in a section) and sections that hold layers, component
sets, and every ancestor of the selection are open. So a click inside a
top-level frame selects its direct child, the empty part of a top-level
frame or section selects nothing, and a selected layer's siblings and
cousins are one click away. Double-click goes one level deeper and
Cmd/Ctrl-click reaches the deepest layer.

A marquee started inside a top-level frame or section selects that
container's layers; from the page, a frame or section holding layers is
selected only when fully enclosed.

* fix(vue): compare marquee hits by canvas bounds

A marquee scoped to a rotated frame mapped only two corners into its space, and page-level enclosure used a frame's unrotated rectangle. Both now compare each layer's axis-aligned canvas bounds with the marquee, so rotated frames and their children are selected by what is drawn.
2026-10-05 12:39:04 +00:00
..
count-descendants.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
drop-target.test.ts fix: match Figma when dragging, drawing, duplicating, and pasting (#894) 2026-10-05 12:39:03 +00:00
graph.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
helpers.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
hit-test.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
id-generator.test.ts feat(scene-graph)!: let a SceneGraph take its ID generator (#887) 2026-10-05 08:21:22 +00:00
layout-affecting-keys.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
selectable-hit.test.ts feat: select layers at Figma's click depth (#900) 2026-10-05 12:39:04 +00:00
text-picture-keys.test.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
update-node.test.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
variables.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00