Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Interface. Imultiple Edges Router

cleanupRoutingPoints()

cleanupRoutingPoints(edge, routingPoints, updateHandles, addRoutingPoints): void

Defined in: packages/sprotty/src/features/routing/routing.ts:123

Remove/add points in order to keep routing constraints consistent, or reset RPs on reconnect.

Parameters

edge

SRoutableElementImpl

routingPoints

Point[]

updateHandles

boolean

addRoutingPoints

boolean

Returns

void

Inherited from

IEdgeRouter.cleanupRoutingPoints


createRoutingHandles()

createRoutingHandles(edge): void

Defined in: packages/sprotty/src/features/routing/routing.ts:108

Creates the routing handles for the given target.

Parameters

edge

SRoutableElementImpl

Returns

void

Inherited from

IEdgeRouter.createRoutingHandles


derivativeAt()

derivativeAt(edge, t): undefined | Point

Defined in: packages/sprotty/src/features/routing/routing.ts:98

Calculates the derivative at a point on the edge.

Parameters

edge

SRoutableElementImpl

t

number

a value between 0 (sourceAnchor) and 1 (targetAnchor)

Returns

undefined | Point

the point or undefined if t is out of bounds or it cannot be computed

Inherited from

IEdgeRouter.derivativeAt


findOrthogonalIntersection()

findOrthogonalIntersection(edge, point): undefined | { derivative: Point; point: Point; }

Defined in: packages/sprotty/src/features/routing/routing.ts:82

Finds the orthogonal intersection point between an edge and a given point in 2D space.

Parameters

edge

SRoutableElementImpl

The edge to find the intersection point on.

point

Point

The point to find the intersection with.

Returns

undefined | { derivative: Point; point: Point; }

The intersection point and its derivative on the respective edge segment.

Inherited from

IEdgeRouter.findOrthogonalIntersection


getHandlePosition()

getHandlePosition(edge, route, handle): undefined | Point

Defined in: packages/sprotty/src/features/routing/routing.ts:103

Retuns the position of the given handle based on the routing points of the edge.

Parameters

edge

SRoutableElementImpl

route

RoutedPoint[]

handle

SRoutingHandleImpl

Returns

undefined | Point

Inherited from

IEdgeRouter.getHandlePosition


pointAt()

pointAt(edge, t): undefined | Point

Defined in: packages/sprotty/src/features/routing/routing.ts:90

Calculates a point on the edge

Parameters

edge

SRoutableElementImpl

t

number

a value between 0 (sourceAnchor) and 1 (targetAnchor)

Returns

undefined | Point

the point or undefined if t is out of bounds or it cannot be computed

Inherited from

IEdgeRouter.pointAt


route()

route(edge): RoutedPoint[]

Defined in: packages/sprotty/src/features/routing/routing.ts:73

Calculates the route of the given edge.

Parameters

edge

SRoutableElementImpl

Returns

RoutedPoint[]

Inherited from

IEdgeRouter.route


routeAll()

routeAll(edges, parent): EdgeRouting

Defined in: packages/sprotty/src/features/routing/routing.ts:137

Parameters

edges

SRoutableElementImpl[]

parent

Readonly<SParentElementImpl>

Returns

EdgeRouting


takeSnapshot()

takeSnapshot(edge): EdgeSnapshot

Defined in: packages/sprotty/src/features/routing/routing.ts:128

Creates a snapshot of the given edge, storing all the data needed to restore it to its current state.

Parameters

edge

SRoutableElementImpl

Returns

EdgeSnapshot

Inherited from

IEdgeRouter.takeSnapshot