0
Fork 0
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:
alonso.torres 2024-01-16 11:48:40 +01:00 committed by Andrés Moya
parent c249bd6f22
commit 792145353e
2 changed files with 5 additions and 2 deletions

View file

@ -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)

View file

@ -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)))))