mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-25 06:22:14 -03:00
Initial commit
Add initial project files and setup.
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
import {logger, LogLevel} from "./logger.js";
|
||||
import {createModuleLogger} from "./LoggerUtils.js";
|
||||
import {snapToGrid, getSnapAdjustment} from "./CommonUtils.js";
|
||||
|
||||
// Inicjalizacja loggera dla modułu CanvasInteractions
|
||||
const log = {
|
||||
debug: (...args) => logger.debug('CanvasInteractions', ...args),
|
||||
info: (...args) => logger.info('CanvasInteractions', ...args),
|
||||
warn: (...args) => logger.warn('CanvasInteractions', ...args),
|
||||
error: (...args) => logger.error('CanvasInteractions', ...args)
|
||||
};
|
||||
|
||||
// Konfiguracja loggera dla modułu CanvasInteractions
|
||||
logger.setModuleLevel('CanvasInteractions', LogLevel.DEBUG);
|
||||
const log = createModuleLogger('CanvasInteractions');
|
||||
|
||||
export class CanvasInteractions {
|
||||
constructor(canvas) {
|
||||
@@ -564,7 +557,7 @@ export class CanvasInteractions {
|
||||
x: originalPos.x + totalDx,
|
||||
y: originalPos.y + totalDy
|
||||
};
|
||||
const snapAdjustment = this.canvas.getSnapAdjustment(tempLayerForSnap);
|
||||
const snapAdjustment = getSnapAdjustment(tempLayerForSnap);
|
||||
finalDx += snapAdjustment.dx;
|
||||
finalDy += snapAdjustment.dy;
|
||||
}
|
||||
@@ -699,4 +692,4 @@ export class CanvasInteractions {
|
||||
this.canvas.viewport.y -= rectY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user