mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-25 14:25:44 -03:00
Refactor logging and formatting
Improved code readability
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {createModuleLogger} from "./utils/LoggerUtils.js";
|
||||
import {snapToGrid, getSnapAdjustment} from "./utils/CommonUtils.js";
|
||||
|
||||
const log = createModuleLogger('CanvasInteractions');
|
||||
|
||||
export class CanvasInteractions {
|
||||
@@ -502,10 +503,8 @@ export class CanvasInteractions {
|
||||
layer.x -= finalX;
|
||||
layer.y -= finalY;
|
||||
});
|
||||
|
||||
// Update mask position when moving canvas
|
||||
this.canvas.maskTool.updatePosition(-finalX, -finalY);
|
||||
|
||||
|
||||
this.canvas.viewport.x -= finalX;
|
||||
this.canvas.viewport.y -= finalY;
|
||||
}
|
||||
@@ -690,8 +689,6 @@ export class CanvasInteractions {
|
||||
layer.x -= rectX;
|
||||
layer.y -= rectY;
|
||||
});
|
||||
|
||||
// Update mask position when resizing canvas
|
||||
this.canvas.maskTool.updatePosition(-rectX, -rectY);
|
||||
|
||||
this.canvas.viewport.x -= rectX;
|
||||
|
||||
Reference in New Issue
Block a user