REmoving snapSizeToGrid
This commit is contained in:
parent
0b85715c1e
commit
1926a3930d
1 changed files with 0 additions and 16 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue