mirror of
https://github.com/penpot/penpot.git
synced 2026-08-18 18:58:40 +00:00
🐛 Fix font family typography asset persist across files in new created text layers
This commit is contained in:
parent
5571c53502
commit
f73df0fba1
@ -346,7 +346,8 @@
|
|||||||
(assoc :recent-colors (:recent-colors storage/user))
|
(assoc :recent-colors (:recent-colors storage/user))
|
||||||
(assoc :recent-fonts (:recent-fonts storage/user))
|
(assoc :recent-fonts (:recent-fonts storage/user))
|
||||||
(assoc :current-file-id file-id)
|
(assoc :current-file-id file-id)
|
||||||
(assoc :workspace-presence {})))
|
(assoc :workspace-presence {})
|
||||||
|
(update :workspace-global dissoc :default-font)))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
@ -544,7 +545,7 @@
|
|||||||
:workspace-tokens
|
:workspace-tokens
|
||||||
:workspace-undo
|
:workspace-undo
|
||||||
:workspace-versions)
|
:workspace-versions)
|
||||||
(update :workspace-global dissoc :read-only?)
|
(update :workspace-global dissoc :read-only? :default-font)
|
||||||
(assoc-in [:workspace-global :options-mode] :design)
|
(assoc-in [:workspace-global :options-mode] :design)
|
||||||
(update :files d/update-vals #(dissoc % :data))))
|
(update :files d/update-vals #(dissoc % :data))))
|
||||||
|
|
||||||
|
|||||||
@ -824,7 +824,8 @@
|
|||||||
(let [multiple? (->> data vals (d/seek #(= % :multiple)))]
|
(let [multiple? (->> data vals (d/seek #(= % :multiple)))]
|
||||||
(cond-> state
|
(cond-> state
|
||||||
(not multiple?)
|
(not multiple?)
|
||||||
(assoc-in [:workspace-global :default-font] data))))))
|
(assoc-in [:workspace-global :default-font]
|
||||||
|
(dissoc data :typography-ref-id :typography-ref-file)))))))
|
||||||
|
|
||||||
(defn apply-text-modifier
|
(defn apply-text-modifier
|
||||||
[shape text-modifier]
|
[shape text-modifier]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user