File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,13 @@ wrapper.wrapText(50, 'hello');
3333const overlay = renderer . addOverlay ( document . createElement ( 'div' ) , 'manual' ) ;
3434overlay . mode = 'scale' ;
3535renderer . _updateOverlays ( ) ;
36+
37+ declare const textSkin : RenderWebGL . TextBubbleSkin ;
38+ // @ts -expect-error
39+ textSkin . _style . cornerRadius = 10 ;
40+ // @ts -expect-error
41+ textSkin . _style = textSkin . _style ;
42+ textSkin . setStyle ( {
43+ fontSize : 50 ,
44+ lineHeight : 40
45+ } ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,21 @@ declare namespace RenderWebGL {
1212 root : HTMLElement ;
1313 userElement : HTMLElement ;
1414 }
15+ interface TextBubbleStyle {
16+ maxLineWidth : number ;
17+ minWidth : number ;
18+ strokeWidth : number ;
19+ padding : number ;
20+ cornerRadius : number ;
21+ tailHeight : number ;
22+ font : string ;
23+ fontSize : number ;
24+ fontHeightRatio : number ;
25+ lineHeight : number ;
26+ bubbleFill : string ;
27+ bubbleStroke : string ;
28+ textFill : string ;
29+ }
1530
1631 type AnyWebGLContext = WebGLRenderingContext | WebGL2RenderingContext ;
1732
@@ -252,6 +267,9 @@ declare namespace RenderWebGL {
252267 }
253268
254269 class CanvasMeasurementProvider {
270+ // TW
271+ clearCache ( ) : void ;
272+
255273 _ctx : CanvasRenderingContext2D ;
256274 _cache : Record < string , number > ;
257275 measureText ( text : string ) : number ;
@@ -274,6 +292,10 @@ declare namespace RenderWebGL {
274292 }
275293
276294 class TextBubbleSkin extends Skin {
295+ // TW
296+ readonly _style : Readonly < TextBubbleStyle > ;
297+ setStyle ( newStyles : Partial < TextBubbleStyle > ) : void ;
298+
277299 _renderer : RenderWebGL ;
278300
279301 _canvas : HTMLCanvasElement ;
You can’t perform that action at this time.
0 commit comments