mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 06:46:11 +02:00
♻️ Refactor change builder for make it more efficient
Mainly replaces the usafe of the inneficient d/preconj helper with a combination of conj and simple list as data structure whitch maintains the previous ordering semantics on addition. Also removes the d/preconj from the codebase.
This commit is contained in:
parent
4e974cd2f3
commit
5b3e12bb9c
9 changed files with 326 additions and 294 deletions
|
@ -178,9 +178,11 @@
|
|||
[{:keys [redo-changes undo-changes
|
||||
origin save-undo? file-id undo-group tags stack-undo?]
|
||||
:or {save-undo? true stack-undo? false tags #{} undo-group (uuid/next)}}]
|
||||
(let [error (volatile! nil)
|
||||
page-id (:current-page-id @st/state)
|
||||
frames (changed-frames redo-changes (wsh/lookup-page-objects @st/state))]
|
||||
(let [error (volatile! nil)
|
||||
page-id (:current-page-id @st/state)
|
||||
frames (changed-frames redo-changes (wsh/lookup-page-objects @st/state))
|
||||
undo-changes (vec undo-changes)
|
||||
redo-changes (vec redo-changes)]
|
||||
(ptk/reify ::commit-changes
|
||||
cljs.core/IDeref
|
||||
(-deref [_]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue