Skip to content

Commit

Permalink
wait for setup before firing ready event
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed May 2, 2024
1 parent 9f73686 commit 976141d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class CanvasSpace extends MultiTouchSpace {
this._container.appendChild( this._canvas );

} else {
this._ready( callback );
// Wait one turn for .setup() to be called before firing ready event
setTimeout( this._ready.bind( this, callback ), 100 );
}
}

Expand Down

0 comments on commit 976141d

Please sign in to comment.