diff --git a/common/src/app/common/geom/shapes/flex_layout/params.cljc b/common/src/app/common/geom/shapes/flex_layout/params.cljc index 4293dd53d..7bd1ce855 100644 --- a/common/src/app/common/geom/shapes/flex_layout/params.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/params.cljc @@ -19,7 +19,9 @@ ([objects shapes parent] (when (d/not-empty? shapes) - (let [points + (let [shapes (->> shapes (remove :hidden)) + + points (->> shapes (map :id) (ctt/sort-z-index objects) diff --git a/common/src/app/common/geom/shapes/grid_layout/params.cljc b/common/src/app/common/geom/shapes/grid_layout/params.cljc index 16fcfd426..befd93e68 100644 --- a/common/src/app/common/geom/shapes/grid_layout/params.cljc +++ b/common/src/app/common/geom/shapes/grid_layout/params.cljc @@ -117,7 +117,8 @@ :layout-grid-rows [ctl/default-track-value ctl/default-track-value]} (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 (map #(vector % (grc/points->rect (get % :points)))))