Initial commit

Add initial project files and setup.
This commit is contained in:
Dariusz L
2025-06-26 00:57:12 +02:00
parent 0c3baa3fbd
commit 7e539d37ab
8 changed files with 1247 additions and 393 deletions

View File

@@ -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;
}
}
}
}