mirror of
https://github.com/penpot/penpot.git
synced 2025-03-28 15:41:25 -05: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
|
@ -46,6 +46,7 @@
|
|||
- Fix horizontal margins drag don't always start from place [Taiga #5020](https://tree.taiga.io/project/penpot/issue/5020)
|
||||
- Fix multiplayer username sometimes is not displayed correctly [Taiga #4400](https://tree.taiga.io/project/penpot/issue/4400)
|
||||
- Show warning when trying to invite a user that is already in members [Taiga #4147](https://tree.taiga.io/project/penpot/issue/4147)
|
||||
- Fix problem with text out of borders when changing from auto-width to fixed [Taiga #4308](https://tree.taiga.io/project/penpot/issue/4308)
|
||||
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
- To @ondrejkonec: for contributing to the code with:
|
||||
|
|
|
@ -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
Reference in a new issue