diff --git a/js/Canvas.js b/js/Canvas.js index 16c0bdb..66f8692 100644 --- a/js/Canvas.js +++ b/js/Canvas.js @@ -443,8 +443,8 @@ export class Canvas { * Inicjalizuje podstawowe właściwości canvas */ initCanvas() { - this.canvas.width = this.width; - this.canvas.height = this.height; + // Don't set canvas.width/height here - let the render loop handle it based on clientWidth/clientHeight + // this.width and this.height are for the OUTPUT AREA, not the display canvas this.canvas.style.border = '1px solid black'; this.canvas.style.maxWidth = '100%'; this.canvas.style.backgroundColor = '#606060'; diff --git a/js/CanvasLayers.js b/js/CanvasLayers.js index 0e08158..a1e180f 100644 --- a/js/CanvasLayers.js +++ b/js/CanvasLayers.js @@ -1100,8 +1100,8 @@ export class CanvasLayers { this.canvas.width = width; this.canvas.height = height; this.canvas.maskTool.resize(width, height); - this.canvas.canvas.width = width; - this.canvas.canvas.height = height; + // Don't set canvas.width/height - the render loop will handle display size + // this.canvas.width/height are for OUTPUT AREA dimensions, not display canvas this.canvas.render(); if (saveHistory) { this.canvas.canvasState.saveStateToDB(); diff --git a/src/Canvas.ts b/src/Canvas.ts index f08b72d..7e29b97 100644 --- a/src/Canvas.ts +++ b/src/Canvas.ts @@ -578,8 +578,8 @@ export class Canvas { * Inicjalizuje podstawowe właściwości canvas */ initCanvas() { - this.canvas.width = this.width; - this.canvas.height = this.height; + // Don't set canvas.width/height here - let the render loop handle it based on clientWidth/clientHeight + // this.width and this.height are for the OUTPUT AREA, not the display canvas this.canvas.style.border = '1px solid black'; this.canvas.style.maxWidth = '100%'; this.canvas.style.backgroundColor = '#606060'; diff --git a/src/CanvasLayers.ts b/src/CanvasLayers.ts index d2d9343..b3f4dda 100644 --- a/src/CanvasLayers.ts +++ b/src/CanvasLayers.ts @@ -1263,8 +1263,8 @@ export class CanvasLayers { this.canvas.height = height; this.canvas.maskTool.resize(width, height); - this.canvas.canvas.width = width; - this.canvas.canvas.height = height; + // Don't set canvas.width/height - the render loop will handle display size + // this.canvas.width/height are for OUTPUT AREA dimensions, not display canvas this.canvas.render();