@@ -68,6 +68,7 @@ export abstract class Span extends Shape {
68
68
@stringProperty textAlignment : CoreTypes . TextAlignmentType & 'middle' ;
69
69
@stringProperty textDecoration : CoreTypes . TextDecorationType ;
70
70
@stringProperty textTransform : CoreTypes . TextTransformType ;
71
+ @stringProperty lineBreak : string | number ;
71
72
72
73
@percentLengthProperty width : CoreTypes . PercentLengthType ;
73
74
@percentLengthProperty height : CoreTypes . PercentLengthType ;
@@ -214,6 +215,7 @@ export abstract class Span extends Shape {
214
215
const fontstyle = this . fontStyle || parent . style . fontStyle || parent . fontStyle ;
215
216
const fontFamily = this . fontFamily ;
216
217
const color = this . color || parent . style . color ;
218
+ const lineBreak = this . lineBreak || parent [ 'lineBreak' ] ;
217
219
const xfermode = this . xfermode ;
218
220
const fontSize = this . fontSize ;
219
221
const letterSpacing = this . letterSpacing ;
@@ -238,7 +240,7 @@ export abstract class Span extends Shape {
238
240
if ( color ) {
239
241
cachedPaint . color = color ;
240
242
}
241
- this . mStaticlayout = new StaticLayout ( text , cachedPaint , w , align , 1 , 0 , true ) ;
243
+ this . mStaticlayout = new StaticLayout ( text , cachedPaint , w , align , 1 , 0 , true , lineBreak ) ;
242
244
return this . mStaticlayout ;
243
245
}
244
246
@@ -408,7 +410,7 @@ export abstract class Span extends Shape {
408
410
}
409
411
}
410
412
}
411
- staticlayout . draw ( canvas ) ;
413
+ staticlayout . draw ( canvas , h ) ;
412
414
}
413
415
toNativeString ( ) { }
414
416
}
0 commit comments