0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Fix undo redo buttons on workspace.

And add minor improvements to the undo/redo
changes detection system.
This commit is contained in:
Andrey Antukh 2017-03-03 13:14:50 +01:00
parent df14f7e364
commit d95b43f9c1
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
3 changed files with 4 additions and 3 deletions

View file

@ -218,6 +218,7 @@
;; --- Apply Displacement
(deftype ApplyDisplacement [id]
udp/IPageUpdate
ptk/WatchEvent
(watch [_ state stream]
(let [displacement (get-in state [:workspace :modifiers id :displacement])]

View file

@ -31,7 +31,6 @@
(satisfies? udp/IMetadataUpdate %)))
(rx/filter #(not (undo? %)))
(rx/filter #(not (redo? %)))
(rx/debounce 500)
(rx/map #(save-undo-entry id))))))
(defn watch-page-changes
@ -53,6 +52,7 @@
(defn save-undo-entry
[id]
{:pre [(uuid? id)]}
(SaveUndoEntry. id))
(defn save-undo-entry?

View file

@ -55,8 +55,8 @@
page (mx/react refs/selected-page)
flags (mx/react refs/flags)
toggle #(st/emit! (dw/toggle-flag %))
on-undo #(st/emit! (udh/backwards-to-previous-version))
on-redo #(st/emit! (udh/forward-to-next-version))
on-undo #(st/emit! (udu/undo))
on-redo #(st/emit! (udu/redo))
on-image #(udl/open! :import-image)
on-download #(udl/open! :download)]
[:header#workspace-bar.workspace-bar