From 9315a8810edd2d92423bd7446f48a7dd6fb9abe9 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Fri, 14 Mar 2025 09:30:22 +1100 Subject: [PATCH] Increase slot context menu hit box (#777) Previously, gap between slots was the same height as the slot itself. Gap is now entirely removed, bringing it inline with the previously-modified snap and link connection hit boxes. --- src/LGraphNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index 4f3d0f64f..1c766b4ea 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -1863,7 +1863,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { if (inputs) { for (const [i, input] of inputs.entries()) { const pos = this.getInputPos(i) - if (isInRectangle(x, y, pos[0] - 10, pos[1] - 5, 20, 10)) { + if (isInRectangle(x, y, pos[0] - 10, pos[1] - 10, 20, 20)) { return { input, slot: i, link_pos: pos } } } @@ -1872,7 +1872,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { if (outputs) { for (const [i, output] of outputs.entries()) { const pos = this.getOutputPos(i) - if (isInRectangle(x, y, pos[0] - 10, pos[1] - 5, 20, 10)) { + if (isInRectangle(x, y, pos[0] - 10, pos[1] - 10, 20, 20)) { return { output, slot: i, link_pos: pos } } }