Clear text layer to the background color on creation
Prevents a black flash before the first draw
This commit is contained in:
@@ -33,6 +33,10 @@ export abstract class BaseRenderLayer implements IRenderLayer {
|
||||
this._canvas.style.zIndex = zIndex.toString();
|
||||
this._ctx = this._canvas.getContext('2d', {alpha});
|
||||
this._ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
|
||||
// Draw the background if this is an opaque layer
|
||||
if (!alpha) {
|
||||
this.clearAll();
|
||||
}
|
||||
container.appendChild(this._canvas);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user