Remove unused blend mode methods and imports

Eliminated the applyBlendMode method from Canvas and CanvasLayers, along with related unused imports in CanvasIO and CanvasLayers. This streamlines the code by removing dead code and unnecessary dependencies.
This commit is contained in:
Dariusz L
2025-06-26 05:17:21 +02:00
parent 7c23373e8c
commit 8b9edddc6a
3 changed files with 4 additions and 20 deletions

View File

@@ -372,8 +372,4 @@ export class Canvas {
showOpacitySlider(mode) {
return this.canvasLayers.showOpacitySlider(mode);
}
applyBlendMode(mode, opacity) {
return this.canvasLayers.applyBlendMode(mode, opacity);
}
}

View File

@@ -1,7 +1,4 @@
import {saveImage, getImage, removeImage} from "./db.js";
import {logger, LogLevel} from "./logger.js";
import {createCanvas, normalizeToUint8} from "./utils/CommonUtils.js";
import {createImageFromSource} from "./utils/ImageUtils.js";
import {createCanvas} from "./utils/CommonUtils.js";
import {createModuleLogger} from "./utils/LoggerUtils.js";
const log = createModuleLogger('CanvasIO');

View File

@@ -1,8 +1,7 @@
import {saveImage, getImage, removeImage} from "./db.js";
import {saveImage, removeImage} from "./db.js";
import {createModuleLogger} from "./utils/LoggerUtils.js";
import {generateUUID, snapToGrid, getSnapAdjustment, worldToLocal, localToWorld, createCanvas, generateUniqueFileName} from "./utils/CommonUtils.js";
import {withErrorHandling, createValidationError, safeExecute} from "./ErrorHandler.js";
import {createImageFromSource} from "./utils/ImageUtils.js";
import {generateUUID, generateUniqueFileName} from "./utils/CommonUtils.js";
import {withErrorHandling, createValidationError} from "./ErrorHandler.js";
const log = createModuleLogger('CanvasLayers');
export class CanvasLayers {
@@ -611,14 +610,6 @@ export class CanvasLayers {
modeElement.appendChild(slider);
}
}
applyBlendMode(mode, opacity) {
this.currentLayer.style.mixBlendMode = mode;
this.currentLayer.style.opacity = opacity / 100;
this.selectedBlendMode = null;
this.isAdjustingOpacity = false;
}
async getFlattenedCanvasAsBlob() {
return new Promise((resolve, reject) => {
const tempCanvas = document.createElement('canvas');