mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
🐛 Lay out the parent of a new bool again
A bool takes the bounds of its result, smaller than those of the shapes it combines for an intersection, but creating it did not update the layout it is in, so in a grid board it kept a place the layout does not give it. It now updates the layout of its parent, as grouping does. The benchmark covers JVM code; this change is ClojureScript only, so it is not run. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
d659ab3b9e
commit
8c57e7b3a9
@ -30,7 +30,10 @@
|
||||
(dsh/process-selected objects))]
|
||||
(when-let [[shape changes] (clb/generate-create-bool it page-id objects ids type force-shape-id)]
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(dws/select-shapes (d/ordered-set (:id shape)))))))))
|
||||
(dws/select-shapes (d/ordered-set (:id shape)))
|
||||
;; the bool takes the bounds of its result, which the layout it
|
||||
;; is in places again
|
||||
(ptk/data-event :layout/update {:ids [(:parent-id shape)]})))))))
|
||||
|
||||
(defn group-to-bool
|
||||
[shape-id type]
|
||||
|
||||
@ -1109,3 +1109,10 @@
|
||||
(await (replay {:world [2 0 {:variants false :rich-variants false :text true :layout :flex
|
||||
:layout-copies false :layout-children true}]
|
||||
:ops [[:structure 11 1 13] [:structure 0 3]]})))
|
||||
|
||||
(t/deftest ^:async generated-a-bool-in-a-grid-is-placed-by-it
|
||||
;; a bool takes the bounds of its result, which the grid it is in places
|
||||
(await (replay {:world [3 0 {:variants true :rich-variants true :text true :layout :grid
|
||||
:layout-copies true :layout-children true}]
|
||||
:ops [[:rotate 16 0 7 0] [:grid-direction 0 0 0 1] [:grid-cell 0 10 0 1] [:add-child 0]
|
||||
[:structure 3 6 15] [:grid-direction 0 0 0 1] [:grid-cell 0 4 2 1]]})))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user