mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fix undo for set typography
This commit is contained in:
parent
0db24dc7ec
commit
b9b85b5ada
1 changed files with 9 additions and 5 deletions
|
@ -601,12 +601,16 @@
|
|||
attrs (-> typography
|
||||
(assoc :typography-ref-file file-id)
|
||||
(assoc :typography-ref-id (:id typography))
|
||||
(dissoc :id :name))]
|
||||
(dissoc :id :name))
|
||||
undo-id (js/Symbol)]
|
||||
|
||||
(rx/concat
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
(->> (rx/from (seq selected))
|
||||
(rx/map (fn [id]
|
||||
(let [editor (get editor-state id)]
|
||||
(update-text-attrs {:id id :editor editor :attrs attrs})))))))))
|
||||
(update-text-attrs {:id id :editor editor :attrs attrs})))))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id)))))))
|
||||
|
||||
(defn generate-typography-name
|
||||
[{:keys [font-id font-variant-id] :as typography}]
|
||||
|
|
Loading…
Reference in a new issue