mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
A flex layout can squeeze a fill frame to almost no width and move it onto its child at the frame's right edge. The left constraint keeps the vector from the child to its parent's left side, but after the move the child sits on that side, so the vector has no length and no direction. The displacement scaled a zero unit vector and the child did not move. The displacement now takes the direction from the parent's side, pointing as the vector did before. Tests: start-constraint-moves-a-child-onto-the-start-of-its-squeezed- parent and nesting-a-copy-that-squeezes-a-fill-frame-moves-the-child-at- its-end (the variant gate program of round 11, seed 212451915). Common suite: 2435 tests, 0 failures. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+--------+--------+--------| | deepest-edit-through-three-levels | 35.215 | 20.995 | 22.097 | 0.6 | | edit-through-a-chain-of-dependents | 68.931 | 46.757 | 48.547 | 0.68 | | library-update-into-copies | 83.083 | 47.501 | 55.402 | 0.57 | | main-edit-among-many-shapes | 4.837 | 2.493 | 2.793 | 0.52 | | main-edit-into-10-copies | 1.79 | 1.051 | 1.177 | 0.59 | | main-edit-into-100-copies | 15.415 | 10.322 | 11.091 | 0.67 | | main-edit-into-1000-copies | 153.086 | 91.123 | 97.288 | 0.6 | | variant-switch-into-copies | 32.052 | 20.829 | 21.942 | 0.65 | AI-assisted-by: claude-opus-5-5