From e1aac5cf6194f6b172531b6beddcd9bad5b4dd7b Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:35:56 +1100 Subject: [PATCH] Improve hitbox for group resize (#277) Now the same as the visual area Co-authored-by: Chenlei Hu --- src/LGraphCanvas.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index c9f35a4f2..c1be86014 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -2076,8 +2076,7 @@ export class LGraphCanvas { this.dragging_rectangle = null } - const dist = distance([e.canvasX, e.canvasY], [group.pos[0] + group.size[0], group.pos[1] + group.size[1]]) - if (dist * this.ds.scale < 10) { + if (group.isInResize(e.canvasX, e.canvasY)) { this.resizingGroup = group } else { const f = group.font_size || LiteGraph.DEFAULT_GROUP_FONT_SIZE