mirror of
https://github.com/penpot/penpot.git
synced 2026-07-31 10:26:18 +00:00
🐛 Fix text align shown as left in v3 editor (#10973)
This commit is contained in:
parent
f5b17a5c75
commit
a2231a8bf9
@ -15,8 +15,11 @@
|
||||
(ptk/reify ::v3-update-text-editor-styles
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [merged-styles (merge (txt/get-default-text-attrs)
|
||||
(fonts/valid-default-font
|
||||
(get-in state [:workspace-global :default-font]))
|
||||
new-styles)]
|
||||
(update-in state [:workspace-wasm-editor-styles id] (fnil merge {}) merged-styles)))))
|
||||
(if (not= id (get-in state [:workspace-local :edition]))
|
||||
state
|
||||
(let [defaults (merge (txt/get-default-text-attrs)
|
||||
(fonts/valid-default-font
|
||||
(get-in state [:workspace-global :default-font])))]
|
||||
(update-in state [:workspace-wasm-editor-styles id]
|
||||
(fn [current-styles]
|
||||
(merge defaults current-styles new-styles))))))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user