Class. Manhattan Edge Router
protected
alignX(routingPoints
,index
,x
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:158
Point
[]
number
number
void
protected
alignY(routingPoints
,index
,y
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:175
Point
[]
number
number
void
applyHandleMoves(
edge
,moves
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:249
Updates the routing points and handles of the given edge with regard to the given moves.
void
AbstractEdgeRouter
.applyHandleMoves
protected
applyInnerHandleMoves(edge
,moves
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:109
void
AbstractEdgeRouter
.applyInnerHandleMoves
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
AbstractEdgeRouter
.applyReconnect
applySnapshot(
edge
,snapshot
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:375
Applies a snapshot to the current edge.
void
AbstractEdgeRouter
.applySnapshot
protected
calculateDefaultCorners(edge
,sourceAnchors
,targetAnchors
,options
):Point
[]
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:304
Point
[]
AbstractEdgeRouter
.calculateDefaultCorners
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
; }
AbstractEdgeRouter
.calculateSegment
cleanupRoutingPoints(
edge
,routingPoints
,updateHandles
,addRoutingPoints
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:183
Remove/add points in order to keep routing constraints consistent, or reset RPs on reconnect.
Point
[]
boolean
boolean
void
AbstractEdgeRouter
.cleanupRoutingPoints
protected
commitRoute(edge
,routedPoints
):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:432
void
AbstractEdgeRouter
.commitRoute
protected
correctX(routingPoints
,index
,x
,minimalPointDistance
):number
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:149
Point
[]
number
number
number
number
protected
correctY(routingPoints
,index
,y
,minimalPointDistance
):number
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:166
Point
[]
number
number
number
number
protected
createRoutedCorners(edge
):RoutedPoint
[]
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:63
createRoutingHandles(
edge
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:81
Creates the routing handles for the given target.
void
AbstractEdgeRouter
.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
AbstractEdgeRouter
.derivativeAt
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
AbstractEdgeRouter
.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
AbstractEdgeRouter
.findRouteSegment
protected
getAnchorComputer(connectable
):IAnchorComputer
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:245
AbstractEdgeRouter
.getAnchorComputer
protected
getBestConnectionAnchors(edge
,sourceAnchors
,targetAnchors
,options
):object
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:417
object
source:
Side
target:
Side
protected
getFraction(kind
):undefined
|number
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:102
undefined
| number
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
AbstractEdgeRouter
.getHandlePosition
protected
getInnerHandlePosition(edge
,route
,handle
):undefined
|Point
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:92
undefined
| Point
AbstractEdgeRouter
.getInnerHandlePosition
protected
getOptions(edge
):ManhattanRouterOptions
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:36
protected
getSelfEdgeIndex(edge
):number
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:424
number
AbstractEdgeRouter
.getSelfEdgeIndex
getTranslatedAnchor(
connectable
,refPoint
,refContainer
,edge
,anchorCorrection
):Point
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:237
Point
number
= 0
Point
AbstractEdgeRouter
.getTranslatedAnchor
protected
manhattanify(edge
,routingPoints
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:290
Add artificial routing points to keep all angles rectilinear.
This makes edge morphing look a lot smoother, where RP positions are interpolated linearly probably resulting in non-rectilinear angles. We don’t add handles for these additional RPs.
Point
[]
void
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
removeHandle(edge
,pointIndex
):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:228
number
void
protected
resetRoutingPointsOnReconnect(edge
,routingPoints
,updateHandles
,sourceAnchors
,targetAnchors
):boolean
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:290
Point
[]
boolean
boolean
AbstractEdgeRouter
.resetRoutingPointsOnReconnect
route(
edge
):RoutedPoint
[]
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:44
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.