🐛 Let the WASM engine lay out a moved shape a layout places

With WASM on, a pure move took a shortcut: the translation was applied
to the moved shapes and their subtrees without asking the engine to lay
them out. A shape in a layout's flow then stayed where it was moved,
where the CLJS engine's layout put it back, and a copy shape kept the
move as a geometry override. A move of a shape that a layout places now
goes through the engine like any other transform.

Found by replaying generated programs in the browser with WASM on. The
JVM benchmark does not run the WASM path; it is not run.

AI-assisted-by: claude-opus-5-5
This commit is contained in:
alonso.torres 2026-11-14 12:43:09 +01:00
parent 5d84e9a449
commit 447125339e

View File

@ -644,9 +644,18 @@
snap-pixel?
(and (not ignore-snap-pixel) (contains? (:workspace-layout state) :snap-pixel-grid))
;; a layout places the shapes in its flow, so moving one is
;; for the engine to lay out, not a translation to splat
laid-out?
(some (fn [id]
(let [shape (get objects id)]
(and (ctl/any-layout-immediate-child? objects shape)
(not (ctl/position-absolute? shape)))))
(keys modif-tree))
transforms
(cond
(and translation? (not snap-pixel?))
(and translation? (not snap-pixel?) (not laid-out?))
;; Mirror WASM `propagate_modifiers` in CLJS: splat the
;; translation matrix onto every descendant. Without
;; this step the commit would only touch the dragged