Multi-link drag keeps links bundled properly (#224)

This commit is contained in:
filtered
2024-10-29 10:00:08 +11:00
committed by GitHub
parent 5070866299
commit 21b9cb6089

View File

@@ -2,11 +2,11 @@ import type { CanvasColour, Dictionary, Direction, IBoundaryNodes, IContextMenuO
import type { IWidget, TWidgetValue } from "./types/widgets"
import type { LGraphNode, NodeId } from "./LGraphNode"
import type { CanvasDragEvent, CanvasMouseEvent, CanvasWheelEvent, CanvasEventDetail, CanvasPointerEvent } from "./types/events"
import type { LinkDirection, RenderShape, TitleMode } from "./types/globalEnums"
import type { IClipboardContents } from "./types/serialisation"
import type { LLink } from "./LLink"
import type { LGraph } from "./LGraph"
import type { ContextMenu } from "./ContextMenu"
import { LinkDirection, RenderShape, TitleMode } from "./types/globalEnums"
import { LGraphGroup } from "./LGraphGroup"
import { isInsideRectangle, distance, overlapBounding, isPointInRectangle } from "./measure"
import { drawSlot, LabelPosition } from "./draw"
@@ -1894,6 +1894,7 @@ export class LGraphCanvas {
input: input,
output: null,
pos: pos,
direction: node.horizontal !== true ? LinkDirection.RIGHT : LinkDirection.CENTER,
})
}
@@ -3766,7 +3767,7 @@ export class LGraphCanvas {
null,
link_color,
connDir,
LiteGraph.CENTER
link.direction ?? LinkDirection.CENTER
)
ctx.beginPath()