mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
🐛 Fix calculate layout with hidden shapes
This commit is contained in:
parent
c249bd6f22
commit
792145353e
2 changed files with 5 additions and 2 deletions
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
([objects shapes parent]
|
([objects shapes parent]
|
||||||
(when (d/not-empty? shapes)
|
(when (d/not-empty? shapes)
|
||||||
(let [points
|
(let [shapes (->> shapes (remove :hidden))
|
||||||
|
|
||||||
|
points
|
||||||
(->> shapes
|
(->> shapes
|
||||||
(map :id)
|
(map :id)
|
||||||
(ctt/sort-z-index objects)
|
(ctt/sort-z-index objects)
|
||||||
|
|
|
@ -117,7 +117,8 @@
|
||||||
:layout-grid-rows [ctl/default-track-value ctl/default-track-value]}
|
:layout-grid-rows [ctl/default-track-value ctl/default-track-value]}
|
||||||
(ctl/create-cells [1 1 2 2]))
|
(ctl/create-cells [1 1 2 2]))
|
||||||
|
|
||||||
(let [all-shapes-rect (gco/shapes->rect shapes)
|
(let [shapes (->> shapes (remove :hidden))
|
||||||
|
all-shapes-rect (gco/shapes->rect shapes)
|
||||||
shapes+bounds
|
shapes+bounds
|
||||||
(->> shapes
|
(->> shapes
|
||||||
(map #(vector % (grc/points->rect (get % :points)))))
|
(map #(vector % (grc/points->rect (get % :points)))))
|
||||||
|
|
Loading…
Reference in a new issue