mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
🔥 Remove the unused sync offset helper
geometry-sync-delta gave the offset a sync applies to a swapped child's top-left. The sync places a swapped child with update-swapped-placement, so nothing calls it. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 19.099 | 0.54 | | edit-through-a-chain-of-dependents | 68.931 | 37.265 | 0.54 | | library-update-into-copies | 83.083 | 47.334 | 0.57 | | main-edit-among-many-shapes | 4.837 | 2.055 | 0.42 | | main-edit-into-10-copies | 1.79 | 1.007 | 0.56 | | main-edit-into-100-copies | 15.415 | 9.18 | 0.60 | | main-edit-into-1000-copies | 153.086 | 92.235 | 0.60 | | variant-switch-into-copies | 32.052 | 20.23 | 0.63 | AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
288e43dd7a
commit
65cc2cf7c6
@ -265,13 +265,6 @@
|
||||
:include-deleted? true))]
|
||||
(recur shape-inst' next-data component')))))))
|
||||
|
||||
(defn- geometry-sync-delta
|
||||
"Offset the sync applies to the top-left of `dest-shape` when it copies the
|
||||
geometry of `origin-shape`."
|
||||
[dest-shape origin-shape dest-root origin-root]
|
||||
(gpt/subtract (grc/rect->point (:selrect (reposition-shape origin-shape origin-root dest-root)))
|
||||
(grc/rect->point (:selrect dest-shape))))
|
||||
|
||||
(defn- follow-parent-modifiers
|
||||
"Modifiers that make `child` follow the change of its parent from
|
||||
`parent-before` to `parent-after`, through the child constraints."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user