mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix problem moving grid elements
This commit is contained in:
parent
8b6be5b62e
commit
2031e513ed
1 changed files with 6 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
||||||
[app.common.types.component :as ctk]
|
[app.common.types.component :as ctk]
|
||||||
[app.common.types.container :as ctn]
|
[app.common.types.container :as ctn]
|
||||||
[app.common.types.modifiers :as ctm]
|
[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.attrs :refer [editable-attrs]]
|
||||||
[app.common.types.shape.layout :as ctl]
|
[app.common.types.shape.layout :as ctl]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
|
@ -193,13 +194,16 @@
|
||||||
(update :shapes #(d/removev ids %))
|
(update :shapes #(d/removev ids %))
|
||||||
(ctl/assign-cells objects))
|
(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
|
frame (-> frame
|
||||||
(update :shapes d/concat-vec ids)
|
(update :shapes d/concat-vec ids)
|
||||||
(cond-> (some? cell)
|
(cond-> (some? cell)
|
||||||
(ctl/push-into-cell ids row column))
|
(ctl/push-into-cell ids row column))
|
||||||
(ctl/assign-cells objects))]
|
(ctl/assign-cells objects))]
|
||||||
|
|
||||||
(-> modifiers
|
(-> modifiers
|
||||||
(ctm/change-property :layout-grid-rows (:layout-grid-rows frame))
|
(ctm/change-property :layout-grid-rows (:layout-grid-rows frame))
|
||||||
(ctm/change-property :layout-grid-columns (:layout-grid-columns frame))
|
(ctm/change-property :layout-grid-columns (:layout-grid-columns frame))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue