mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
Which shapes of a copy a transform leaves untouched (the ignore tree) was frontend code, written twice: calculate-ignore-tree for the modifiers of the SVG renderer and calculate-ignore-tree-wasm for the matrices of the WASM renderer. The second is the single-pass version of the first: each shape still compares itself with the copy root of the latest transformed shape above it, as the repeated walks did when the last one won. app.common.logic.placement now holds it once: calculate-ignore-tree takes the transformed ids in order and a function that transforms a shape, built with modifiers-transform (SVG) or matrices-transform (WASM), both cached per shape. check-delta and transform-attrs moved with it. The frontend calls the common version, and its tests moved to common-tests.logic.placement-test, which runs on the JVM and in JS, with a rotation through modifiers added. No behavior change: the golden masters and the suites are unchanged. The benchmark does not run this code. AI-assisted-by: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>