mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 06:30:04 +00:00
Reduce input socket hitbox for widgets (#966)
Restores the full left-arrow button click area for widgets. Previously lost ~5 canvas pixels to clicks intercepted by input sockets. Supporting refactors: - Maps concrete node slot impls. to private array, once per frame - Converts slot boundingRect to use absolute canvas pos (same as other elements) - Stores parent node ref in concrete slot classes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { INodeInputSlot, INodeOutputSlot, OptionalProps } from "@/interfaces"
|
||||
import type { LGraphNode } from "@/LGraphNode"
|
||||
import type { LinkId } from "@/LLink"
|
||||
|
||||
import { LabelPosition } from "@/draw"
|
||||
@@ -14,8 +15,8 @@ export class NodeOutputSlot extends NodeSlot implements INodeOutputSlot {
|
||||
return false
|
||||
}
|
||||
|
||||
constructor(slot: OptionalProps<INodeOutputSlot, "boundingRect">) {
|
||||
super(slot)
|
||||
constructor(slot: OptionalProps<INodeOutputSlot, "boundingRect">, node: LGraphNode) {
|
||||
super(slot, node)
|
||||
this.links = slot.links
|
||||
this._data = slot._data
|
||||
this.slot_index = slot.slot_index
|
||||
|
||||
Reference in New Issue
Block a user