Class. Manhattan Edge Router
protectedalignX(routingPoints,index,x):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:158
Point[]
number
number
void
protectedalignY(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
protectedapplyInnerHandleMoves(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
protectedcalculateDefaultCorners(edge,sourceAnchors,targetAnchors,options):Point[]
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:304
Point[]
AbstractEdgeRouter.calculateDefaultCorners
protectedcalculateSegment(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
protectedcommitRoute(edge,routedPoints):void
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:432
void
AbstractEdgeRouter.commitRoute
protectedcorrectX(routingPoints,index,x,minimalPointDistance):number
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:149
Point[]
number
number
number
number
protectedcorrectY(routingPoints,index,y,minimalPointDistance):number
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:166
Point[]
number
number
number
number
protectedcreateRoutedCorners(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
protectedfindRouteSegment(edge,route,handleIndex):object
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:217
number
object
optionalend:Point
optionalstart:Point
AbstractEdgeRouter.findRouteSegment
protectedgetAnchorComputer(connectable):IAnchorComputer
Defined in: packages/sprotty/src/features/routing/abstract-edge-router.ts:245
AbstractEdgeRouter.getAnchorComputer
protectedgetBestConnectionAnchors(edge,sourceAnchors,targetAnchors,options):object
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:417
object
source:
Side
target:
Side
protectedgetFraction(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
protectedgetInnerHandlePosition(edge,route,handle):undefined|Point
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:92
undefined | Point
AbstractEdgeRouter.getInnerHandlePosition
protectedgetOptions(edge):ManhattanRouterOptions
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:36
protectedgetSelfEdgeIndex(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
protectedmanhattanify(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
protectedremoveHandle(edge,pointIndex):void
Defined in: packages/sprotty/src/features/routing/manhattan-edge-router.ts:228
number
void
protectedresetRoutingPointsOnReconnect(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.