0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 17:00:36 -05:00

🐛 Fix preview of moving a copy of a flex component into its main

This commit is contained in:
Pablo Alba 2023-09-11 17:24:02 +02:00 committed by Andrés Moya
parent fe36a9e958
commit b4b5aaafe4

View file

@ -511,11 +511,15 @@
[(assoc move-vector :x 0) :x]
:else
[move-vector nil])]
[move-vector nil])
(-> (dwm/create-modif-tree ids (ctm/move-modifiers move-vector))
(dwm/build-change-frame-modifiers objects selected target-frame drop-index cell-data)
(dwm/set-modifiers false false {:snap-ignore-axis snap-ignore-axis}))))))
nesting-loop? (some #(cph/components-nesting-loop? objects (:id %) target-frame) shapes)]
(cond-> (dwm/create-modif-tree ids (ctm/move-modifiers move-vector))
(not nesting-loop?)
(dwm/build-change-frame-modifiers objects selected target-frame drop-index cell-data)
:always
(dwm/set-modifiers false false {:snap-ignore-axis snap-ignore-axis}))))))
(->> move-stream
(rx/with-latest-from ms/mouse-position-alt)