Skip to content

CanvasViewCanvasEdge

Unofficial

Represents a connection (edge) between two nodes on the canvas.

Import:

import type { CanvasViewCanvasEdge } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface CanvasViewCanvasEdge

Properties

Property Type Description
bbox BBox Bounding box of the edge for spatial indexing.
bezier Bezier Bezier curve data used for rendering the edge path.
canvas CanvasViewCanvas Reference to the parent canvas instance.
color string Color of the edge line (CSS color string or preset name).
from CanvasViewCanvasEdgeLink Link information for the source endpoint of the edge.
fromLineEnd CanvasViewCanvasEdgeLineEnd | null Line end marker at the source endpoint, or null if none.
id string Unique identifier for this edge.
initialized boolean Whether the edge has been initialized.
isAttached? unknown Whether the edge is currently attached to the canvas DOM.
label string Text label displayed on the edge.
lineEndGroupEl SVGGElement SVG group element containing the line end markers.
lineGroupEl SVGGElement SVG group element containing the edge line paths.
path CanvasViewCanvasEdgePath SVG path elements for the edge (display and interaction).
to CanvasViewCanvasEdgeLink Link information for the target endpoint of the edge.
toLineEnd CanvasViewCanvasEdgeLineEnd | null Line end marker at the target endpoint, or null if none.
unknownData object Additional data properties not covered by known fields.

Methods

Method Returns Description
attach() unknown Attach the edge to the canvas DOM.
blur() unknown Remove focus from the edge.
createEdgeEnd(arg1) unknown Create a line end marker element for the specified end type.
deselect() unknown Deselect the edge.
destroy() unknown Destroy the edge and release its resources.
detach() unknown Detach the edge from the canvas DOM.
editLabel() unknown Open an inline editor for the edge's label.
focus() unknown Set focus on the edge.
getBBox() unknown Get the bounding box of the edge.
getCenter() unknown Get the center point of the edge path.
getData() unknown Get the serialized data for this edge.
initialize() unknown Initialize the edge after construction.
onClick(arg1) unknown Handle click events on the edge.
onConnectionPointerdown(arg1) unknown Handle pointer down on a connection point to start re-routing.
onContextMenu(arg1) unknown Handle context menu events on the edge.
render() unknown Render the edge to the canvas.
select() unknown Mark the edge as selected.
setColor(arg1, arg2) unknown Set the color of the edge.
setData(arg1) unknown Set the serialized data for this edge.
setLabel(arg1) unknown Set the text label of the edge.
showMenu(arg1, arg2) unknown Show the context menu for this edge.
update(arg1, arg2) unknown Update the edge after its connected nodes have moved.
updatePath() unknown Recalculate and update the SVG path of the edge.

Links to this page: