mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 03:51:38 +02:00
🔧 Small refactor changes-builder
This commit is contained in:
parent
96870c3fee
commit
8682c07148
2 changed files with 71 additions and 77 deletions
|
@ -1163,8 +1163,8 @@
|
|||
(watch [it state _]
|
||||
(let [prev-index (-> (get-in state [:workspace-data :pages])
|
||||
(d/index-of id))
|
||||
changes (-> (pcb/empty-changes it id)
|
||||
(pcb/move-page index prev-index))]
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/move-page id index prev-index))]
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
|
||||
;; --- Shape / Selection Alignment and Distribution
|
||||
|
@ -1837,7 +1837,7 @@
|
|||
;; Adds a reg-objects operation so the groups are updated. We add all the new objects
|
||||
new-objects-ids (->> changes :redo-changes (filter #(= (:type %) :add-obj)) (mapv :id))
|
||||
|
||||
changes (pcb/reg-objects changes new-objects-ids)
|
||||
changes (pcb/resize-parents changes new-objects-ids)
|
||||
|
||||
selected (->> changes
|
||||
:redo-changes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue