mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
🐛 Fix problem when moving absolute positioned shapes
This commit is contained in:
parent
5ed1ff6d41
commit
8032a22f14
1 changed files with 13 additions and 8 deletions
|
@ -777,14 +777,19 @@
|
||||||
|
|
||||||
:add-children
|
:add-children
|
||||||
(let [value (dm/get-prop operation :value)
|
(let [value (dm/get-prop operation :value)
|
||||||
index (dm/get-prop operation :index)]
|
index (dm/get-prop operation :index)
|
||||||
(if (some? index)
|
|
||||||
(update shape :shapes
|
shape
|
||||||
(fn [shapes]
|
(if (some? index)
|
||||||
(if (vector? shapes)
|
(update shape :shapes
|
||||||
(d/insert-at-index shapes index value)
|
(fn [shapes]
|
||||||
(d/concat-vec shapes value))))
|
(if (vector? shapes)
|
||||||
(update shape :shapes d/concat-vec value)))
|
(d/insert-at-index shapes index value)
|
||||||
|
(d/concat-vec shapes value))))
|
||||||
|
(update shape :shapes d/concat-vec value))]
|
||||||
|
|
||||||
|
;; Remove duplication
|
||||||
|
(update shape :shapes #(into [] (apply d/ordered-set %))))
|
||||||
|
|
||||||
:remove-children
|
:remove-children
|
||||||
(let [value (dm/get-prop operation :value)]
|
(let [value (dm/get-prop operation :value)]
|
||||||
|
|
Loading…
Reference in a new issue