mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 15:16:11 +02:00
🐛 Fix problem with text out of borders when changing from auto-width to fixed
This commit is contained in:
parent
8a6809848e
commit
eedb83e863
2 changed files with 6 additions and 4 deletions
|
@ -234,10 +234,11 @@
|
|||
|
||||
;; When we have a text with grow-type :auto-height or :auto-height we need to check the correct height
|
||||
;; otherwise the center alignment will break
|
||||
tr-shape (when text-modifier (dwt/apply-text-modifier shape text-modifier))
|
||||
shape (cond-> shape
|
||||
(and (some? text-modifier) (#{:auto-height :auto-width} (:grow-type shape)))
|
||||
(assoc :width (:width tr-shape) :height (:height tr-shape)))
|
||||
shape
|
||||
(if (some? text-modifier)
|
||||
(let [{:keys [width height]} (dwt/apply-text-modifier shape text-modifier)]
|
||||
(assoc shape :width width :height height))
|
||||
shape)
|
||||
|
||||
shape (hooks/use-equal-memo shape)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue