Skip to content

Commit

Permalink
Re-add grid snapping to node resize
Browse files Browse the repository at this point in the history
  • Loading branch information
catboxanon committed Jan 15, 2025
1 parent 9b641a4 commit 5f29b53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2429,6 +2429,9 @@ export class LGraphCanvas {
}
}

snapPoint(newPos, this.#snapToGrid)
snapPoint(newSize, this.#snapToGrid)

const minSize = node.computeSize()
if (newSize[0] < minSize[0]) {
const diff = minSize[0] - newSize[0]
Expand Down

0 comments on commit 5f29b53

Please sign in to comment.