Skip to content

Commit

Permalink
Snap groups to grid after auto-fitting
Browse files Browse the repository at this point in the history
Prevents unexpected snapping on workflow reload, undo/redo, etc.
  • Loading branch information
webfiltered committed Nov 30, 2024
1 parent 2d6adf4 commit b19758c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LGraphGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ export class LGraphGroup implements Positionable, IPinnable {
this.pos[1] = boundingBox[1] - this.titleHeight
this.size[0] = boundingBox[2]
this.size[1] = boundingBox[3] + this.titleHeight

const snapTo = this.graph?.getSnapToGridSize()
if (snapTo) this.snapToGrid(snapTo)
}

/**
Expand Down

0 comments on commit b19758c

Please sign in to comment.