mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
🐛 Fix problem with auto-width initial text
This commit is contained in:
parent
0828d43f8f
commit
b25806b172
1 changed files with 6 additions and 2 deletions
|
@ -63,13 +63,17 @@
|
|||
(ted/get-editor-current-content))]
|
||||
(if (ted/content-has-text? content)
|
||||
(let [content (d/merge (ted/export-content content)
|
||||
(dissoc (:content shape) :children))]
|
||||
(dissoc (:content shape) :children))
|
||||
modifiers (get-in state [:workspace-text-modifier id])]
|
||||
(rx/merge
|
||||
(rx/of (update-editor-state shape nil))
|
||||
(when (and (not= content (:content shape))
|
||||
(some? (:current-page-id state)))
|
||||
(rx/of
|
||||
(dch/update-shapes [id] #(assoc % :content content))
|
||||
(dch/update-shapes [id] (fn [shape]
|
||||
(-> shape
|
||||
(assoc :content content)
|
||||
(merge modifiers))))
|
||||
(dwu/commit-undo-transaction)))))
|
||||
|
||||
(when (some? id)
|
||||
|
|
Loading…
Reference in a new issue