本文へ移動

@eightkk/vue-weave / core / graphEdgeEndpoint

Function: graphEdgeEndpoint() ​

graphEdgeEndpoint(layout, nodes, edge, end, direction): object

Defined in: src/core/graph.ts:427

Where an edge meets its node. A named port gives its anchor. Otherwise, when the edge has an id and the layout has a path for it, the drawn start or end point of that path is used, with the box side closest to it. Without a path the side follows direction. Rendering and editing handles therefore agree after nodes are moved or when a custom layout chooses its own sides. Throws an Error naming the edge and the node when the node has no layout box, and an Error naming the node and the port when the port side is not left, right, top or bottom.

Parameters ​

layout ​

GraphLayout

nodes ​

ReadonlyMap<string, IdentifiedNode>

edge ​

GraphConnection

end ​

"from" | "to"

direction ​

GraphLayoutDirection

Returns ​

object

side ​

side: "left" | "right" | "top" | "bottom" = port.side

x ​

x: number

y ​

y: number

MIT ライセンスで公開しています。