mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
🐛 Fix problem with reset alignment on change text
This commit is contained in:
parent
46ed61f070
commit
26fa2a71ea
1 changed files with 8 additions and 4 deletions
|
@ -428,6 +428,8 @@
|
|||
[shape text]
|
||||
(let [content (:content shape)
|
||||
|
||||
root-styles (select-keys content root-attrs)
|
||||
|
||||
paragraph-style (merge
|
||||
default-text-attrs
|
||||
(select-keys (->> content (node-seq is-paragraph-node?) first) text-all-attrs))
|
||||
|
@ -447,10 +449,12 @@
|
|||
:children [(merge {:text pt} text-style)]}))))
|
||||
|
||||
new-content
|
||||
{:type "root"
|
||||
:children
|
||||
[{:type "paragraph-set"
|
||||
:children paragraphs}]}]
|
||||
(d/patch-object
|
||||
{:type "root"
|
||||
:children
|
||||
[{:type "paragraph-set"
|
||||
:children paragraphs}]}
|
||||
root-styles)]
|
||||
|
||||
(assoc shape :content new-content)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue