mirror of
https://github.com/penpot/penpot.git
synced 2025-01-07 15:39:42 -05:00
🐛 Fix layers get out of their group when moved
Signed-off-by: Andrei Zhurau <zhurov.andrew@gmail.com>
This commit is contained in:
parent
b926409fa2
commit
5febd35cfe
2 changed files with 3 additions and 9 deletions
|
@ -45,6 +45,8 @@
|
|||
- Fix copy and paste layers order [Taiga #1617](https://tree.taiga.io/project/penpot/issue/1617)
|
||||
- Fix unexpected removal of guides on copy&paste frames [Taiga #3887](https://tree.taiga.io/project/penpot/issue/3887) by @andrewzhurov
|
||||
- Fix props preserving on copy&paste texts [Taiga #3629](https://tree.taiga.io/project/penpot/issue/3629) by @andrewzhurov
|
||||
- Fix unexpected layers ungrouping on moving it [Taiga #3932](https://tree.taiga.io/project/penpot/issue/3932) by @andrewzhurov
|
||||
|
||||
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
|
|
|
@ -854,14 +854,6 @@
|
|||
(rx/of (set-modifiers [id] {:displacement displ} false true)
|
||||
(apply-modifiers [id]))))))
|
||||
|
||||
(defn check-frame-move?
|
||||
[target-frame-id objects position shape]
|
||||
|
||||
(let [current-frame (get objects (:frame-id shape))]
|
||||
;; If the current frame contains the point and it's a child of the target
|
||||
(and (gsh/has-point? current-frame position)
|
||||
(cph/is-child? objects target-frame-id (:id current-frame)))))
|
||||
|
||||
(defn- calculate-frame-for-move
|
||||
[ids]
|
||||
(ptk/reify ::calculate-frame-for-move
|
||||
|
@ -876,7 +868,7 @@
|
|||
(->> ids
|
||||
(cph/clean-loops objects)
|
||||
(keep #(get objects %))
|
||||
(remove (partial check-frame-move? frame-id objects position)))
|
||||
(remove #(= (:frame-id %) frame-id)))
|
||||
|
||||
moving-frames
|
||||
(->> ids
|
||||
|
|
Loading…
Reference in a new issue