Skip to content

Commit

Permalink
fix(): regression unwanted init retina
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Jan 3, 2023
1 parent f5e96ca commit cba9325
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions src/canvas/canvas.class.ts
Expand Up @@ -516,10 +516,7 @@ export class SelectableCanvas<
this._createUpperCanvas();
}

/**
* @private
*/
_initRetinaScaling() {
protected _initRetinaScaling() {
super._initRetinaScaling();
this.__initRetinaScaling(this.upperCanvasEl, this.contextTop);
}
Expand Down
10 changes: 2 additions & 8 deletions src/canvas/static_canvas.class.ts
Expand Up @@ -290,7 +290,7 @@ export class StaticCanvas<
this.initElements(el);
this._initOptions(options);
this.calcOffset();
this._initRetinaScaling();
this._isRetinaScaling() && this._initRetinaScaling();
this.calcViewportBoundaries();
}

Expand Down Expand Up @@ -360,13 +360,7 @@ export class StaticCanvas<
return this._isRetinaScaling() ? Math.max(1, config.devicePixelRatio) : 1;
}

/**
* @private
*/
_initRetinaScaling() {
if (!this._isRetinaScaling()) {
return;
}
protected _initRetinaScaling() {
this.__initRetinaScaling(this.lowerCanvasEl, this.contextContainer);
}

Expand Down

0 comments on commit cba9325

Please sign in to comment.