Class. Abstract Edge Router
applyReconnect(
edge
,newSourceId?
,newTargetId?
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:316
Updates the routing points and handles of the given edge with regard to the given moves.
string
string
void
applySnapshot(
edge
,snapshot
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:375
Applies a snapshot to the current edge.
void
protected
calculateDefaultCorners(edge
,sourceAnchors
,targetAnchors
,options
):Point
[]
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:389
Point
[]
protected
calculateSegment(edge
,t
):undefined
| {lambda
:number
;segmentEnd
:Point
;segmentStart
:Point
; }
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:145
number
undefined
| { lambda
: number
; segmentEnd
: Point
; segmentStart
: Point
; }
cleanupRoutingPoints(
edge
,routingPoints
,updateHandles
,addRoutingPoints
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:284
Remove/add points in order to keep routing constraints consistent, or reset RPs on reconnect.
Point
[]
boolean
boolean
void
IEdgeRouter
.cleanupRoutingPoints
protected
commitRoute(edge
,routedPoints
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:432
void
abstract
createRoutingHandles(edge
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:87
Creates the routing handles for the given target.
void
IEdgeRouter
.createRoutingHandles
derivativeAt(
edge
,t
):undefined
|Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:134
Calculates the derivative at a point on the edge.
number
a value between 0 (sourceAnchor) and 1 (targetAnchor)
undefined
| Point
the point or undefined if t is out of bounds or it cannot be computed
findOrthogonalIntersection(
edge
,point
):object
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:91
Finds the orthogonal intersection point between an edge and a given point in 2D space.
The edge to find the intersection point on.
Point
The point to find the intersection with.
object
The intersection point and its derivative on the respective edge segment.
derivative:
Point
point:
Point
IEdgeRouter
.findOrthogonalIntersection
protected
findRouteSegment(edge
,route
,handleIndex
):object
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:217
number
object
optional
end:Point
optional
start:Point
protected
getAnchorComputer(connectable
):IAnchorComputer
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:245
getHandlePosition(
edge
,route
,handle
):undefined
|Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:192
Retuns the position of the given handle based on the routing points of the edge.
undefined
| Point
abstract
protected
getInnerHandlePosition(edge
,route
,handle
):undefined
|Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:215
undefined
| Point
abstract
protected
getOptions(edge
):LinearRouteOptions
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:89
protected
getSelfEdgeIndex(edge
):number
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:424
number
getTranslatedAnchor(
connectable
,refPoint
,refContainer
,edge
,anchorCorrection
):Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:237
Point
number
= 0
Point
pointAt(
edge
,t
):undefined
|Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:126
Calculates a point on the edge
number
a value between 0 (sourceAnchor) and 1 (targetAnchor)
undefined
| Point
the point or undefined if t is out of bounds or it cannot be computed
protected
resetRoutingPointsOnReconnect(edge
,routingPoints
,updateHandles
,sourceAnchors
,targetAnchors
):boolean
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:290
Point
[]
boolean
boolean
abstract
route(edge
):RoutedPoint
[]
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:85
Calculates the route of the given edge.
takeSnapshot(
edge
):EdgeSnapshot
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:362
Creates a snapshot of the given edge, storing all the data needed to restore it to its current state.