0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 14:51:37 -05:00

🎉 Remove shapes-group

This commit is contained in:
Alejandro Alonso 2024-03-05 11:12:39 +01:00
parent 4dfbfcf2ac
commit 895fb3b480
2 changed files with 4 additions and 9 deletions

View file

@ -507,8 +507,7 @@
(and (:shape-ref parent)
(#{:group :frame} (:type parent))
(not ignore-touched))
(-> (update :touched cfh/set-touched-group :shapes-group)
(dissoc :remote-synced)))))
(dissoc :remote-synced))))
(remove-from-old-parent [old-objects objects shape-id]
(let [prev-parent-id (dm/get-in old-objects [shape-id :parent-id])]
@ -525,9 +524,7 @@
(-> objects
(d/update-in-when [pid :shapes] d/without-obj sid)
(d/update-in-when [pid :shapes] d/vec-without-nils)
(cond-> component? (d/update-when pid #(-> %
(update :touched cfh/set-touched-group :shapes-group)
(dissoc :remote-synced)))))))))
(cond-> component? (d/update-when pid #(dissoc % :remote-synced))))))))
(update-parent-id [objects id]
(-> objects
(d/update-when id assoc :parent-id parent-id)))

View file

@ -40,8 +40,7 @@
(update :shapes update-parent-shapes)
(update :shapes d/vec-without-nils)
(cond-> (and (ctk/in-component-copy? parent) (not ignore-touched))
(-> (update :touched cfh/set-touched-group :shapes-group)
(dissoc :remote-synced)))))
(dissoc :remote-synced))))
update-objects
(fn [objects parent-id]
@ -85,8 +84,7 @@
(let [parent (update parent :shapes d/without-obj shape-id)]
(cond-> parent
(and (:shape-ref parent) (not ignore-touched))
(-> (update :touched cfh/set-touched-group :shapes-group)
(dissoc :remote-synced)))))
(dissoc :remote-synced))))
(delete-from-objects [objects]
(if-let [target (get objects shape-id)]