diff --git a/inventory/templates/testing.html b/inventory/templates/testing.html index f8f67a2..65c909f 100644 --- a/inventory/templates/testing.html +++ b/inventory/templates/testing.html @@ -267,7 +267,6 @@ function applyGridSize(newSize) { if (!Number.isFinite(n) || n < 1) return; gridSize = n; - snapSizeToGrid(); dotSize = Math.floor(Math.max(gridSize * 1.25, 32)); @@ -308,20 +307,6 @@ function setActiveType(typeId) { } } -function snapSizeToGrid() { - const grid = gridSize; - const rect = gridEl.getBoundingClientRect(); - - const targetW = rect.width; - const targetH = rect.height; - - const snappedW = Math.floor(targetW / grid) * grid + 1; - const snappedH = Math.floor(targetH / grid) * grid + 1; - - gridEl.style.width = `${snappedW}px`; - gridEl.style.height = `${snappedH}px`; -} - function snapToGrid(x, y) { /* For portability, we do not allow pixel coordinates in the data model @@ -400,7 +385,6 @@ function normalizeLine(shape) { } function resizeAndSetupCanvas() { - snapSizeToGrid(); dpr = window.devicePixelRatio || 1; const rect = canvasEl.getBoundingClientRect();