mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 15:21:37 +02:00
♻️ Components refactor: generator for sync head
This commit is contained in:
parent
37e68249aa
commit
f3220fa985
2 changed files with 10 additions and 3 deletions
|
@ -2046,3 +2046,12 @@
|
||||||
(-> changes
|
(-> changes
|
||||||
(generate-new-shape-for-swap shape file page libraries id-new-component index target-cell keep-props-values))]
|
(generate-new-shape-for-swap shape file page libraries id-new-component index target-cell keep-props-values))]
|
||||||
[new-shape all-parents changes]))
|
[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))
|
|
@ -695,9 +695,7 @@
|
||||||
|
|
||||||
changes
|
changes
|
||||||
(-> (pcb/empty-changes it)
|
(-> (pcb/empty-changes it)
|
||||||
(pcb/with-container container)
|
(cflh/generate-sync-head file-full libraries container head components-v2))]
|
||||||
(pcb/with-objects (:objects container))
|
|
||||||
(cflh/generate-sync-shape-direct file-full libraries container (:id head) false components-v2))]
|
|
||||||
|
|
||||||
(log/debug :msg "SYNC-head finished" :js/rchanges (log-changes
|
(log/debug :msg "SYNC-head finished" :js/rchanges (log-changes
|
||||||
(:redo-changes changes)
|
(:redo-changes changes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue