Skip to content

Commit

Permalink
Resolve #395 - thick selection rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
webfiltered committed Dec 25, 2024
1 parent 6165709 commit 93d43f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,8 @@ export class LGraphCanvas {
linkSegment.path &&
this.ctx.isPointInStroke(linkSegment.path, x * dpi, y * dpi)
) {
this.ctx.lineWidth = lineWidth

if (e.shiftKey && !e.altKey) {
const slot = linkSegment.origin_slot
const originNode = graph._nodes_by_id[linkSegment.origin_id]
Expand All @@ -2197,6 +2199,8 @@ export class LGraphCanvas {
return
}
} else if (isInRectangle(x, y, centre[0] - 4, centre[1] - 4, 8, 8)) {
this.ctx.lineWidth = lineWidth

pointer.onClick = () => this.showLinkMenu(linkSegment, e)
pointer.onDragStart = () => this.dragging_canvas = true
pointer.finally = () => this.dragging_canvas = false
Expand Down

0 comments on commit 93d43f2

Please sign in to comment.