mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-25 14:25:44 -03:00
Rename canvasMask to maskEditorIntegration in Canvas
Refactors the Canvas class to rename the 'canvasMask' property to 'maskEditorIntegration' for consistency. Updates all references and import to use the new name with the .js extension.
This commit is contained in:
@@ -13,7 +13,7 @@ import { ImageReferenceManager } from "./ImageReferenceManager.js";
|
|||||||
import { BatchPreviewManager } from "./BatchPreviewManager.js";
|
import { BatchPreviewManager } from "./BatchPreviewManager.js";
|
||||||
import { createModuleLogger } from "./utils/LoggerUtils.js";
|
import { createModuleLogger } from "./utils/LoggerUtils.js";
|
||||||
import { debounce } from "./utils/CommonUtils.js";
|
import { debounce } from "./utils/CommonUtils.js";
|
||||||
import { MaskEditorIntegration } from "./MaskEditorIntegration";
|
import { MaskEditorIntegration } from "./MaskEditorIntegration.js";
|
||||||
import { CanvasSelection } from "./CanvasSelection.js";
|
import { CanvasSelection } from "./CanvasSelection.js";
|
||||||
const useChainCallback = (original, next) => {
|
const useChainCallback = (original, next) => {
|
||||||
if (original === undefined || original === null) {
|
if (original === undefined || original === null) {
|
||||||
@@ -85,7 +85,7 @@ export class Canvas {
|
|||||||
this.maskTool = new MaskTool(this, { onStateChange: this.onStateChange });
|
this.maskTool = new MaskTool(this, { onStateChange: this.onStateChange });
|
||||||
this.shapeTool = new ShapeTool(this);
|
this.shapeTool = new ShapeTool(this);
|
||||||
this.customShapeMenu = new CustomShapeMenu(this);
|
this.customShapeMenu = new CustomShapeMenu(this);
|
||||||
this.canvasMask = new MaskEditorIntegration(this);
|
this.maskEditorIntegration = new MaskEditorIntegration(this);
|
||||||
this.canvasState = new CanvasState(this);
|
this.canvasState = new CanvasState(this);
|
||||||
this.canvasSelection = new CanvasSelection(this);
|
this.canvasSelection = new CanvasSelection(this);
|
||||||
this.canvasInteractions = new CanvasInteractions(this);
|
this.canvasInteractions = new CanvasInteractions(this);
|
||||||
@@ -409,7 +409,7 @@ export class Canvas {
|
|||||||
* @param {boolean} sendCleanImage - Czy wysłać czysty obraz (bez maski) do editora
|
* @param {boolean} sendCleanImage - Czy wysłać czysty obraz (bez maski) do editora
|
||||||
*/
|
*/
|
||||||
async startMaskEditor(predefinedMask = null, sendCleanImage = true) {
|
async startMaskEditor(predefinedMask = null, sendCleanImage = true) {
|
||||||
return this.canvasMask.startMaskEditor(predefinedMask, sendCleanImage);
|
return this.maskEditorIntegration.startMaskEditor(predefinedMask, sendCleanImage);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Inicjalizuje podstawowe właściwości canvas
|
* Inicjalizuje podstawowe właściwości canvas
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {ImageReferenceManager} from "./ImageReferenceManager.js";
|
|||||||
import {BatchPreviewManager} from "./BatchPreviewManager.js";
|
import {BatchPreviewManager} from "./BatchPreviewManager.js";
|
||||||
import {createModuleLogger} from "./utils/LoggerUtils.js";
|
import {createModuleLogger} from "./utils/LoggerUtils.js";
|
||||||
import { debounce } from "./utils/CommonUtils.js";
|
import { debounce } from "./utils/CommonUtils.js";
|
||||||
import {MaskEditorIntegration} from "./MaskEditorIntegration";
|
import {MaskEditorIntegration} from "./MaskEditorIntegration.js";
|
||||||
import {CanvasSelection} from "./CanvasSelection.js";
|
import {CanvasSelection} from "./CanvasSelection.js";
|
||||||
import type { ComfyNode, Layer, Viewport, Point, AddMode, Shape, OutputAreaBounds } from './types';
|
import type { ComfyNode, Layer, Viewport, Point, AddMode, Shape, OutputAreaBounds } from './types';
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ export class Canvas {
|
|||||||
canvasInteractions: CanvasInteractions;
|
canvasInteractions: CanvasInteractions;
|
||||||
canvasLayers: CanvasLayers;
|
canvasLayers: CanvasLayers;
|
||||||
canvasLayersPanel: CanvasLayersPanel;
|
canvasLayersPanel: CanvasLayersPanel;
|
||||||
canvasMask: MaskEditorIntegration;
|
maskEditorIntegration: MaskEditorIntegration;
|
||||||
canvasRenderer: CanvasRenderer;
|
canvasRenderer: CanvasRenderer;
|
||||||
canvasSelection: CanvasSelection;
|
canvasSelection: CanvasSelection;
|
||||||
canvasState: CanvasState;
|
canvasState: CanvasState;
|
||||||
@@ -146,7 +146,7 @@ export class Canvas {
|
|||||||
this.maskTool = new MaskTool(this, {onStateChange: this.onStateChange});
|
this.maskTool = new MaskTool(this, {onStateChange: this.onStateChange});
|
||||||
this.shapeTool = new ShapeTool(this);
|
this.shapeTool = new ShapeTool(this);
|
||||||
this.customShapeMenu = new CustomShapeMenu(this);
|
this.customShapeMenu = new CustomShapeMenu(this);
|
||||||
this.canvasMask = new MaskEditorIntegration(this);
|
this.maskEditorIntegration = new MaskEditorIntegration(this);
|
||||||
this.canvasState = new CanvasState(this);
|
this.canvasState = new CanvasState(this);
|
||||||
this.canvasSelection = new CanvasSelection(this);
|
this.canvasSelection = new CanvasSelection(this);
|
||||||
this.canvasInteractions = new CanvasInteractions(this);
|
this.canvasInteractions = new CanvasInteractions(this);
|
||||||
@@ -530,7 +530,7 @@ export class Canvas {
|
|||||||
* @param {boolean} sendCleanImage - Czy wysłać czysty obraz (bez maski) do editora
|
* @param {boolean} sendCleanImage - Czy wysłać czysty obraz (bez maski) do editora
|
||||||
*/
|
*/
|
||||||
async startMaskEditor(predefinedMask: HTMLImageElement | HTMLCanvasElement | null = null, sendCleanImage: boolean = true) {
|
async startMaskEditor(predefinedMask: HTMLImageElement | HTMLCanvasElement | null = null, sendCleanImage: boolean = true) {
|
||||||
return this.canvasMask.startMaskEditor(predefinedMask as any, sendCleanImage);
|
return this.maskEditorIntegration.startMaskEditor(predefinedMask as any, sendCleanImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user