0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 06:41:40 -05:00

♻️ Components refactor: generator for sync head

This commit is contained in:
Alejandro Alonso 2024-04-25 08:08:29 +02:00 committed by Andrés Moya
parent 37e68249aa
commit f3220fa985
2 changed files with 10 additions and 3 deletions

View file

@ -2046,3 +2046,12 @@
(-> changes
(generate-new-shape-for-swap shape file page libraries id-new-component index target-cell keep-props-values))]
[new-shape all-parents changes]))
(defn generate-sync-head
[changes file-full libraries container head components-v2]
(let [changes
(-> changes
(pcb/with-container container)
(pcb/with-objects (:objects container))
(generate-sync-shape-direct file-full libraries container (:id head) false components-v2))]
changes))

View file

@ -695,9 +695,7 @@
changes
(-> (pcb/empty-changes it)
(pcb/with-container container)
(pcb/with-objects (:objects container))
(cflh/generate-sync-shape-direct file-full libraries container (:id head) false components-v2))]
(cflh/generate-sync-head file-full libraries container head components-v2))]
(log/debug :msg "SYNC-head finished" :js/rchanges (log-changes
(:redo-changes changes)