mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 22:19:19 +00:00
🐛 Fix problem with reset alignment on change text
This commit is contained in:
parent
46ed61f070
commit
26fa2a71ea
@ -428,6 +428,8 @@
|
|||||||
[shape text]
|
[shape text]
|
||||||
(let [content (:content shape)
|
(let [content (:content shape)
|
||||||
|
|
||||||
|
root-styles (select-keys content root-attrs)
|
||||||
|
|
||||||
paragraph-style (merge
|
paragraph-style (merge
|
||||||
default-text-attrs
|
default-text-attrs
|
||||||
(select-keys (->> content (node-seq is-paragraph-node?) first) text-all-attrs))
|
(select-keys (->> content (node-seq is-paragraph-node?) first) text-all-attrs))
|
||||||
@ -447,10 +449,12 @@
|
|||||||
:children [(merge {:text pt} text-style)]}))))
|
:children [(merge {:text pt} text-style)]}))))
|
||||||
|
|
||||||
new-content
|
new-content
|
||||||
{:type "root"
|
(d/patch-object
|
||||||
:children
|
{:type "root"
|
||||||
[{:type "paragraph-set"
|
:children
|
||||||
:children paragraphs}]}]
|
[{:type "paragraph-set"
|
||||||
|
:children paragraphs}]}
|
||||||
|
root-styles)]
|
||||||
|
|
||||||
(assoc shape :content new-content)))
|
(assoc shape :content new-content)))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user