mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 01:41:38 +02:00
💄 Add cosmetic changes to common libraries logic ns
This commit is contained in:
parent
e7b0e253d4
commit
12fa4fdef5
1 changed files with 20 additions and 17 deletions
|
@ -204,7 +204,8 @@
|
|||
(cond-> {}
|
||||
force-frame? (assoc :force-frame-id frame-id)))
|
||||
|
||||
first-shape (cond-> (first new-shapes)
|
||||
first-shape
|
||||
(cond-> (first new-shapes)
|
||||
(not (nil? parent-id))
|
||||
(assoc :parent-id parent-id)
|
||||
(and (not (nil? parent)) (= :frame (:type parent)))
|
||||
|
@ -217,7 +218,8 @@
|
|||
(assoc :frame-id frame-id))
|
||||
|
||||
;; on copy/paste old id is used later to reorder the paster layers
|
||||
changes (cond-> (pcb/add-object changes first-shape {:ignore-touched true})
|
||||
changes
|
||||
(cond-> (pcb/add-object changes first-shape {:ignore-touched true})
|
||||
(some? old-id) (pcb/amend-last-change #(assoc % :old-id old-id)))
|
||||
|
||||
changes
|
||||
|
@ -239,7 +241,8 @@
|
|||
(pcb/reorder-grid-children [(:parent-id first-shape)])))
|
||||
changes)
|
||||
|
||||
changes (reduce #(pcb/add-object %1 %2 {:ignore-touched true})
|
||||
changes
|
||||
(reduce #(pcb/add-object %1 %2 {:ignore-touched true})
|
||||
changes
|
||||
(rest new-shapes))]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue