Skip to content

Commit 15542b9

Browse files
skunkworxdarkpsychedelicious
authored andcommitted
Fix nodes ui: Make nodes dot background to be the same as the snap to grid size and position
Fix nodes ui: Make nodes dot background to be the same as the snap to grid size and position Update to Flow.tsx Changes the size and offset of the dots background to be the same size as the snap to grid, and also fix the background dot pattern alignment. Currently, the snapGrid is 25x25, and the default background dot gap is 20x20, these do not align. This is fixed by making the gap property of the background the same as the snapGrid. Additionally, there is a bug in the rectFlow background code that incorrectly sets the offset to be the centre of the dot pattern with the default offset of 0. To work around this issue, setting the background offset property to the snapGrid size will realign the dot pattern correctly. I have logged a bug for the rectFlow background issue in its repo. xyflow/xyflow#5405
1 parent 6430d83 commit 15542b9

File tree

1 file changed

+1
-1
lines changed
  • invokeai/frontend/web/src/features/nodes/components/flow

1 file changed

+1
-1
lines changed

invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export const Flow = memo(() => {
263263
noWheelClassName={NO_WHEEL_CLASS}
264264
noPanClassName={NO_PAN_CLASS}
265265
>
266-
<Background />
266+
<Background gap={snapGrid} offset={snapGrid} />
267267
</ReactFlow>
268268
<HotkeyIsolator />
269269
</>

0 commit comments

Comments
 (0)