0
Fork 0
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:
alonso.torres 2024-07-22 11:27:12 +02:00
parent 46ed61f070
commit 26fa2a71ea

View file

@ -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)))