openpencil/tests/engine/editor/undo
rcoenen 27cfcbb932
fix(resize): scale group and boolean children
* fix(resize): scale children when resizing GROUP or BOOLEAN_OPERATION

Resizing a group (or boolean operation) only moved the bounding box and
rescaled the selection outline — the rendered fill stayed at its original
size, so the blue outline and the filled content visibly diverged.

Two root causes, both in the resize preview path:

1. During drag, children were scaled in the preview graph via
   updateNodePreview(), which mutates nodes without emitting a node:updated
   event. The renderer's vector/geometry caches (vectorPathCache,
   fillGeometryCache, strokeGeometryCache) were therefore never invalidated,
   so fills kept drawing from stale, unscaled cached paths while outlines
   drew live from the new dimensions. Fixed by calling
   renderer.invalidateVectorPath(childId) after each child preview update.

2. On commit, the final scaled values were written with updateNode() but no
   repaint was requested, leaving the canvas frozen on the last mismatched
   drag frame until the next interaction. Fixed by calling requestRepaint()
   after commitGroupResize().

collectDescendants() now also collects children for BOOLEAN_OPERATION nodes,
which render purely from child geometry (no node-level scale), so scaling the
children is the only way to scale the result — same mechanism as GROUP, no
double-transform. Group resize verified visually; boolean resize verified in
-browser via the editor automation API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(editor): preserve vector undo during group resize

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Danila Poyarkov <dev@dannote.net>
2026-06-06 17:05:09 +03:00
..
basic.test.ts test: organize prefixed test files into folders 2026-05-06 02:13:18 +03:00
batch-idle.test.ts chore: enable stricter oxlint rules 2026-05-18 18:58:30 +03:00
create-instance.test.ts fix(scene-graph): avoid id collisions after import 2026-05-13 03:36:28 +03:00
create-shape.test.ts chore(tests): guard more test lookups 2026-05-06 09:43:28 +03:00
group-resize.test.ts fix(resize): scale group and boolean children 2026-06-06 17:05:09 +03:00
redo-sequence.test.ts chore(tests): guard component and cache assertions 2026-05-06 11:07:47 +03:00