File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export default class SubtitleComponent extends Lightning.Component {
44
44
}
45
45
46
46
_init ( ) {
47
+ this . _textureDefaults = new Lightning . textures . TextTexture ( this . stage ) . cloneArgs ( )
47
48
this . tag ( 'Text' ) . on ( 'txLoaded' , ( { _source } ) => {
48
49
this . w = _source . w + this . tag ( 'Text' ) . x * 2
49
50
this . h = _source . h
@@ -153,12 +154,11 @@ export default class SubtitleComponent extends Lightning.Component {
153
154
154
155
_defineBreakpoint ( text , breakpoint ) {
155
156
if ( breakpoint >= this . maxWidth ) return this . maxWidth
156
- const textureDefaults = new Lightning . textures . TextTexture ( this . stage ) . cloneArgs ( )
157
157
const info = Lightning . textures . TextTexture . renderer (
158
158
this . stage ,
159
159
this . stage . platform . getDrawingCanvas ( ) ,
160
160
{
161
- ...textureDefaults ,
161
+ ...this . _textureDefaults ,
162
162
...this . textFormat ,
163
163
...{ wordWrapWidth : breakpoint } ,
164
164
text,
You can’t perform that action at this time.
0 commit comments