File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,18 +115,20 @@ Component({
115115 height : height * pixelRatio ,
116116 } ,
117117 ( ) => {
118- const context = canvas . getContext ( '2d' ) ;
119- const fCanvas = this . createCanvas ( {
120- width,
121- height,
122- pixelRatio,
123- context,
124- createImage : canvas . createImage . bind ( canvas ) ,
125- requestAnimationFrame : canvas . requestAnimationFrame . bind ( canvas ) ,
126- cancelAnimationFrame : canvas . cancelAnimationFrame . bind ( canvas ) ,
127- } ) ;
128- fCanvas . render ( ) . catch ( ( error ) => {
129- this . catchError ( error ) ;
118+ canvas . requestAnimationFrame ( ( ) => {
119+ const context = canvas . getContext ( '2d' ) ;
120+ const fCanvas = this . createCanvas ( {
121+ width,
122+ height,
123+ pixelRatio,
124+ context,
125+ createImage : canvas . createImage . bind ( canvas ) ,
126+ requestAnimationFrame : canvas . requestAnimationFrame . bind ( canvas ) ,
127+ cancelAnimationFrame : canvas . cancelAnimationFrame . bind ( canvas ) ,
128+ } ) ;
129+ fCanvas . render ( ) . catch ( ( error ) => {
130+ this . catchError ( error ) ;
131+ } ) ;
130132 } ) ;
131133 } ,
132134 ) ;
You can’t perform that action at this time.
0 commit comments