Skip to content

CanvasViewCanvasEdge

Unofficial

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

Import:

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

Signature:

export interface CanvasViewCanvasEdge

Properties

PropertyTypeDescription
bboxBBoxBounding box of the edge for spatial indexing.
bezierBezierBezier curve data used for rendering the edge path.
canvasCanvasViewCanvasReference to the parent canvas instance.
colorstringColor of the edge line (CSS color string or preset name).
fromCanvasViewCanvasEdgeLinkLink information for the source endpoint of the edge.
fromLineEndCanvasViewCanvasEdgeLineEnd | nullLine end marker at the source endpoint, or null if none.
idstringUnique identifier for this edge.
initializedbooleanWhether the edge has been initialized.
isAttached?unknownWhether the edge is currently attached to the canvas DOM.
labelstringText label displayed on the edge.
lineEndGroupElSVGGElementSVG group element containing the line end markers.
lineGroupElSVGGElementSVG group element containing the edge line paths.
pathCanvasViewCanvasEdgePathSVG path elements for the edge (display and interaction).
toCanvasViewCanvasEdgeLinkLink information for the target endpoint of the edge.
toLineEndCanvasViewCanvasEdgeLineEnd | nullLine end marker at the target endpoint, or null if none.
unknownDataobjectAdditional data properties not covered by known fields.

Methods

MethodReturnsDescription
attach()unknownAttach the edge to the canvas DOM.
blur()unknownRemove focus from the edge.
createEdgeEnd(arg1)unknownCreate a line end marker element for the specified end type.
deselect()unknownDeselect the edge.
destroy()unknownDestroy the edge and release its resources.
detach()unknownDetach the edge from the canvas DOM.
editLabel()unknownOpen an inline editor for the edge's label.
focus()unknownSet focus on the edge.
getBBox()unknownGet the bounding box of the edge.
getCenter()unknownGet the center point of the edge path.
getData()unknownGet the serialized data for this edge.
initialize()unknownInitialize the edge after construction.
onClick(arg1)unknownHandle click events on the edge.
onConnectionPointerdown(arg1)unknownHandle pointer down on a connection point to start re-routing.
onContextMenu(arg1)unknownHandle context menu events on the edge.
render()unknownRender the edge to the canvas.
select()unknownMark the edge as selected.
setColor(arg1, arg2)unknownSet the color of the edge.
setData(arg1)unknownSet the serialized data for this edge.
setLabel(arg1)unknownSet the text label of the edge.
showMenu(arg1, arg2)unknownShow the context menu for this edge.
update(arg1, arg2)unknownUpdate the edge after its connected nodes have moved.
updatePath()unknownRecalculate and update the SVG path of the edge.

Links to this page: