This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Description
Current code looks like this
@Input() set whiteSpace(whiteSpace: 'normal' | 'overflowWrap' | 'overflowWrap') {
this.set({ whiteSpace });
}
According to the troika-three-text code.
/**
* @member {string} whiteSpace
* Defines whether text should wrap when a line reaches the `maxWidth`. Can
* be either `'normal'` (the default), to allow wrapping according to the `overflowWrap` property,
* or `'nowrap'` to prevent wrapping. Note that `'normal'` here honors newline characters to
* manually break lines, making it behave more like `'pre-wrap'` does in CSS.
*/
this.whiteSpace = 'normal'
Code should look like this
@Input() set whiteSpace(whiteSpace: 'normal' | 'nowrap') {
this.set({ whiteSpace });
}
overflowWrap should be a separate property...
/**
* @member {string} overflowWrap
* Defines how text wraps if the `whiteSpace` property is `normal`. Can be either `'normal'`
* to break at whitespace characters, or `'break-word'` to allow breaking within words.
* Defaults to `'normal'`.
*/
this.overflowWrap = 'normal'