Skip to content

Commit

Permalink
Improve hitbox for group resize (#277)
Browse files Browse the repository at this point in the history
Now the same as the visual area

Co-authored-by: Chenlei Hu <[email protected]>
  • Loading branch information
webfiltered and huchenlei authored Nov 7, 2024
1 parent 7e21b00 commit e1aac5c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1aac5c

Please sign in to comment.