diff --git a/bun.lockb b/bun.lockb index 13cf128..81d0e42 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/npm/src/geometry.ts b/npm/src/geometry.ts index 0cad24b..66a4f29 100644 --- a/npm/src/geometry.ts +++ b/npm/src/geometry.ts @@ -68,9 +68,9 @@ export class Rectangle { }): Rectangle { // Adjust x, y, width, and height according to padding const x = this.x - (padding.left ?? 0); - const y = this.y - (padding.top ?? 0); + const y = this.y - (padding.bottom ?? 0); const width = this.width + (padding.left ?? 0) + (padding.right ?? 0); - const height = this.height + (padding.top ?? 0) + (padding.bottom ?? 0); + const height = this.height + (padding.bottom ?? 0) + (padding.top ?? 0); return new Rectangle(this.data, x, y, width, height); } @@ -142,6 +142,10 @@ export class BoardLayouter { readonly config: Config, ) { const padding = -new Distance(config.extraSpace).m; + console.log('PADDING', padding, { + a: stock, + b: stock.pad({ right: padding, top: padding }), + }); this.paddedStock = stock.pad({ right: padding, top: padding }); } diff --git a/web/composables/useBoardLayoutsQuery.ts b/web/composables/useBoardLayoutsQuery.ts index 07c5d0d..64809e9 100644 --- a/web/composables/useBoardLayoutsQuery.ts +++ b/web/composables/useBoardLayoutsQuery.ts @@ -16,6 +16,8 @@ export default function () { const layouts = computed(() => { const parts = partsQuery.data.value; if (parts == null) return undefined; + + console.log(toRaw(config.value)); return generateBoardLayouts(parts, stock.value, config.value); });