Remove Polish comments and clean up codebase

Removed Polish-language and redundant comments from multiple modules, including Canvas, CanvasInteractions, CanvasLayers, CanvasRenderer, CanvasState, Canvas_view, Mask_tool, and CommonUtils. This improves code readability and maintainability by reducing clutter and focusing on self-explanatory code.
This commit is contained in:
Dariusz L
2025-06-26 05:05:42 +02:00
parent 98d5b18422
commit 93c4bfd90d
8 changed files with 16 additions and 165 deletions

View File

@@ -1,6 +1,4 @@
import {createModuleLogger} from "./utils/LoggerUtils.js";
// Inicjalizacja loggera dla modułu CanvasRenderer
const log = createModuleLogger('CanvasRenderer');
export class CanvasRenderer {
@@ -83,21 +81,15 @@ export class CanvasRenderer {
});
this.drawCanvasOutline(ctx);
// Renderowanie maski w zależności od trybu
const maskImage = this.canvas.maskTool.getMask();
if (this.canvas.maskTool.isActive) {
// W trybie maski pokazuj maskę z przezroczystością 0.5
ctx.globalCompositeOperation = 'source-over';
ctx.globalAlpha = 0.5;
// Rysuj maskę w pozycji (0,0) - będzie dopasowana do obszaru canvasu
ctx.drawImage(maskImage, 0, 0);
ctx.globalAlpha = 1.0;
} else if (maskImage) {
// W trybie warstw pokazuj maskę jako widoczną, ale nieedytowalną
ctx.globalCompositeOperation = 'source-over';
ctx.globalAlpha = 1.0;
// Rysuj maskę w pozycji (0,0) - będzie dopasowana do obszaru canvasu
ctx.drawImage(maskImage, 0, 0);
ctx.globalAlpha = 1.0;
}