Refactor codebase for consistent formatting and style

This commit applies consistent code formatting across multiple files, including spacing, indentation, and object destructuring. No functional changes were made; the update improves code readability and maintainability.
This commit is contained in:
Dariusz L
2025-06-27 07:13:20 +02:00
parent b40d645a79
commit 375ed6a2b8
13 changed files with 163 additions and 143 deletions

View File

@@ -1,4 +1,5 @@
import {createModuleLogger} from "./utils/LoggerUtils.js";
const log = createModuleLogger('CanvasRenderer');
export class CanvasRenderer {
@@ -95,7 +96,7 @@ export class CanvasRenderer {
}
ctx.drawImage(maskImage, this.canvas.maskTool.x, this.canvas.maskTool.y);
ctx.globalAlpha = 1.0;
ctx.restore();
}
@@ -105,7 +106,7 @@ export class CanvasRenderer {
ctx.restore();
if (this.canvas.canvas.width !== this.canvas.offscreenCanvas.width ||
if (this.canvas.canvas.width !== this.canvas.offscreenCanvas.width ||
this.canvas.canvas.height !== this.canvas.offscreenCanvas.height) {
this.canvas.canvas.width = this.canvas.offscreenCanvas.width;
this.canvas.canvas.height = this.canvas.offscreenCanvas.height;
@@ -115,7 +116,7 @@ export class CanvasRenderer {
renderInteractionElements(ctx) {
const interaction = this.canvas.interaction;
if (interaction.mode === 'resizingCanvas' && interaction.canvasResizeRect) {
const rect = interaction.canvasResizeRect;
ctx.save();
@@ -147,7 +148,7 @@ export class CanvasRenderer {
ctx.restore();
}
}
if (interaction.mode === 'movingCanvas' && interaction.canvasMoveRect) {
const rect = interaction.canvasMoveRect;
ctx.save();