mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 04:26:12 +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
|
@ -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 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)
|
- 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)
|
- 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!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
- To @ondrejkonec: for contributing to the code with:
|
- 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
|
;; 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
|
;; otherwise the center alignment will break
|
||||||
tr-shape (when text-modifier (dwt/apply-text-modifier shape text-modifier))
|
shape
|
||||||
shape (cond-> shape
|
(if (some? text-modifier)
|
||||||
(and (some? text-modifier) (#{:auto-height :auto-width} (:grow-type shape)))
|
(let [{:keys [width height]} (dwt/apply-text-modifier shape text-modifier)]
|
||||||
(assoc :width (:width tr-shape) :height (:height tr-shape)))
|
(assoc shape :width width :height height))
|
||||||
|
shape)
|
||||||
|
|
||||||
shape (hooks/use-equal-memo shape)
|
shape (hooks/use-equal-memo shape)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue