diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index e6c87fb242..10e7de720d 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -441,7 +441,7 @@ export class LGraphCanvas implements ConnectionColorContext { /** used for widgets */ node_widget?: [LGraphNode, IWidget] | null /** The link to draw a tooltip for. */ - over_link_center: LinkSegment | null + over_link_center?: LinkSegment last_mouse_position: Point /** The visible area of this canvas. Tightly coupled with {@link ds}. */ visible_area: Rect32 @@ -678,7 +678,6 @@ export class LGraphCanvas implements ConnectionColorContext { this.current_node = null this.node_widget = null - this.over_link_center = null this.last_mouse_position = [0, 0] this.visible_area = this.ds.visible_area this.visible_links = [] @@ -2072,7 +2071,7 @@ export class LGraphCanvas implements ConnectionColorContext { pointer.finally = () => this.dragging_canvas = false // clear tooltip - this.over_link_center = null + this.over_link_center = undefined return } } @@ -2788,7 +2787,7 @@ export class LGraphCanvas implements ConnectionColorContext { const segment = this.#getLinkCentreOnPos(e) if (this.over_link_center !== segment) { underPointer |= CanvasItem.Link - this.over_link_center = segment ?? null + this.over_link_center = segment this.dirty_bgcanvas = true }