mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Refactor canvas and mask handling for clarity and maintainability
Removed redundant comments and streamlined logic across canvas-related modules, including mask positioning, garbage collection, and WebSocket communication. Improved code readability and maintainability by eliminating unnecessary explanations and clarifying intent in both Python and JavaScript files. No functional changes were made; this is a cleanup and refactor for better developer experience.
This commit is contained in:
@@ -502,8 +502,7 @@ 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;
|
||||
@@ -690,8 +689,7 @@ 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