💄 Style changes on clone-object function (now clone-shape)

This commit is contained in:
Andrés Moya 2023-12-15 14:36:47 +01:00 committed by Andrey Antukh
parent 2fc6290c8f
commit f49cf0b6ae
3 changed files with 94 additions and 100 deletions

View file

@ -98,11 +98,11 @@
(gsh/move delta)))
[new-instance-shape new-instance-shapes _]
(ctst/clone-object main-instance-shape
(:parent-id main-instance-shape)
(:objects main-instance-page)
update-new-shape
update-original-shape)
(ctst/clone-shape main-instance-shape
(:parent-id main-instance-shape)
(:objects main-instance-page)
:update-new-shape update-new-shape
:update-original-shape update-original-shape)
remap-frame
(fn [shape]
@ -134,10 +134,9 @@
(let [component-root (d/seek #(nil? (:parent-id %)) (vals (:objects component)))
[new-component-shape new-component-shapes _]
(ctst/clone-object component-root
nil
(get component :objects)
identity)]
(ctst/clone-shape component-root
nil
(get component :objects))]
[new-component-shape new-component-shapes nil nil]))))
@ -976,15 +975,12 @@
original-shape)
[_ new-shapes _]
(ctst/clone-object component-shape
(ctst/clone-shape component-shape
(:id parent-shape)
(get component-page :objects)
update-new-shape
update-original-shape
nil
false
nil
(:objects container))
:update-new-shape update-new-shape
:update-original-shape update-original-shape
:dest-objects (get container :objects))
add-obj-change (fn [changes shape']
(update changes :redo-changes conj
@ -1042,11 +1038,11 @@
original-shape))
[_new-shape new-shapes updated-shapes]
(ctst/clone-object shape
(:id component-parent-shape)
(get page :objects)
update-new-shape
update-original-shape)
(ctst/clone-shape shape
(:id component-parent-shape)
(get page :objects)
:update-new-shape update-new-shape
:update-original-shape update-original-shape)
add-obj-change (fn [changes shape']
(update changes :redo-changes conj