You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's any letter-spacing / word-spacing set on the text, react-truncate will not calculate properly, and it'll render more than this.props.lines lines.
Note that the canvas MUST be added to the DOM in order for Chrome to take into account word/letter spacing in its calculations. Probably fine to just add a hidden element somewhere and use it repeatedly.
The text was updated successfully, but these errors were encountered:
If there's any letter-spacing / word-spacing set on the text, react-truncate will not calculate properly, and it'll render more than
this.props.lines
lines.Looks like you can set
letter-spacing
/word-spacing
on the canvas itself https://stackoverflow.com/questions/8952909/letter-spacing-in-canvas-elementNote that the canvas MUST be added to the DOM in order for Chrome to take into account word/letter spacing in its calculations. Probably fine to just add a hidden element somewhere and use it repeatedly.
The text was updated successfully, but these errors were encountered: