0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

🐛 Fix problem moving grid elements

This commit is contained in:
alonso.torres 2024-03-06 13:18:39 +01:00
parent 8b6be5b62e
commit 2031e513ed

View file

@ -18,6 +18,7 @@
[app.common.types.component :as ctk]
[app.common.types.container :as ctn]
[app.common.types.modifiers :as ctm]
[app.common.types.shape-tree :as ctst]
[app.common.types.shape.attrs :refer [editable-attrs]]
[app.common.types.shape.layout :as ctl]
[app.common.uuid :as uuid]
@ -193,13 +194,16 @@
(update :shapes #(d/removev ids %))
(ctl/assign-cells objects))
ids (->> ids (remove #(ctl/position-absolute? objects %)))
ids (->> ids
(remove #(ctl/position-absolute? objects %))
(ctst/sort-z-index objects)
reverse)
frame (-> frame
(update :shapes d/concat-vec ids)
(cond-> (some? cell)
(ctl/push-into-cell ids row column))
(ctl/assign-cells objects))]
(-> modifiers
(ctm/change-property :layout-grid-rows (:layout-grid-rows frame))
(ctm/change-property :layout-grid-columns (:layout-grid-columns frame))