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

Class. Jumping Polyline Edge View

skipOffsetAfter

protected skipOffsetAfter: number = 2

Defined in: packages/sprotty/src/graph/views.tsx:142


skipOffsetBefore

protected skipOffsetBefore: number = 3

Defined in: packages/sprotty/src/graph/views.tsx:141

Methods

createGapPath()

protected createGapPath(intersectionPoint, lineSegment): string

Defined in: packages/sprotty/src/graph/views.tsx:258

Parameters

intersectionPoint

Point

lineSegment

PointToPointLine

Returns

string


createJumpPath()

protected createJumpPath(intersectionPoint, lineSegment): string

Defined in: packages/sprotty/src/graph/views.tsx:251

Parameters

intersectionPoint

Point

lineSegment

PointToPointLine

Returns

string


getIntersectionsSortedBySegmentDirection()

protected getIntersectionsSortedBySegmentDirection(lineSegment, intersectingPoint): Intersection[]

Defined in: packages/sprotty/src/graph/views.tsx:200

Returns the intersections sorted by the direction of the lineSegment.

The coordinate system goes from left to right and top to bottom. Thus, x increases to the right and y increases downwards.

We need to draw the intersections in the order of the direction of the line segment. To draw a line pointing north, we need to order intersections by Y in a descending order. To draw a line pointing south, we need to order intersections by Y in an ascending order.

Parameters

lineSegment

PointToPointLine

intersectingPoint

IntersectingRoutedPoint

Returns

Intersection[]


getLineSegment()

protected getLineSegment(edge, intersection, args?, segments?): PointToPointLine

Defined in: packages/sprotty/src/graph/views.tsx:236

Parameters

edge

SRoutableElementImpl

intersection

Intersection

args?

IViewArgs

segments?

Point[]

Returns

PointToPointLine


getOtherLineSegment()

protected getOtherLineSegment(currentEdge, intersection, args?): undefined | PointToPointLine

Defined in: packages/sprotty/src/graph/views.tsx:242

Parameters

currentEdge

SEdgeImpl

intersection

Intersection

args?

IViewArgs

Returns

undefined | PointToPointLine


intersectionPath()

protected intersectionPath(edge, segments, intersectingPoint, args?): string

Defined in: packages/sprotty/src/graph/views.tsx:164

Returns a path that takes the intersections into account by drawing a line jump or a gap for intersections on that path.

Parameters

edge

SEdgeImpl

segments

Point[]

intersectingPoint

IntersectingRoutedPoint

args?

IViewArgs

Returns

string


isVisible()

isVisible(model, route, context): boolean

Defined in: packages/sprotty/src/features/routing/views.ts:30

Check whether the given model element is in the current viewport. Use this method in your render implementation to skip rendering in case the element is not visible. This can greatly enhance performance for large models.

Parameters

model

Readonly<SRoutableElementImpl>

route

Point[]

context

RenderingContext

Returns

boolean

Inherited from

PolylineEdgeView.isVisible


render()

render(edge, context, args?): undefined | VNode

Defined in: packages/sprotty/src/graph/views.tsx:67

Parameters

edge

Readonly<SEdgeImpl>

context

RenderingContext

args?

IViewArgs

Returns

undefined | VNode

Inherited from

PolylineEdgeView.render


renderAdditionals()

protected renderAdditionals(edge, segments, context): VNode[]

Defined in: packages/sprotty/src/graph/views.tsx:114

Parameters

edge

SEdgeImpl

segments

Point[]

context

RenderingContext

Returns

VNode[]

Inherited from

PolylineEdgeView.renderAdditionals


renderDanglingEdge()

protected renderDanglingEdge(message, edge, context): VNode

Defined in: packages/sprotty/src/graph/views.tsx:119

Parameters

message

string

edge

SEdgeImpl

context

RenderingContext

Returns

VNode

Inherited from

PolylineEdgeView.renderDanglingEdge


renderJunctionPoints()

protected renderJunctionPoints(edge, route, context, args): any

Defined in: packages/sprotty/src/graph/views.tsx:89

Parameters

edge

Readonly<SEdgeImpl>

route

RoutedPoint[]

context

RenderingContext

args

undefined | IViewArgs

Returns

any

Inherited from

PolylineEdgeView.renderJunctionPoints


renderLine()

protected renderLine(edge, segments, context, args?): VNode

Defined in: packages/sprotty/src/graph/views.tsx:144

Parameters

edge

SEdgeImpl

segments

Point[]

context

RenderingContext

args?

IViewArgs

Returns

VNode

Overrides

PolylineEdgeView.renderLine


shouldDrawLineGapOnIntersection()

protected shouldDrawLineGapOnIntersection(currentLineSegment, otherLineSegment): boolean

Defined in: packages/sprotty/src/graph/views.tsx:232

Whether or not to draw a line gap on an intersection for the currentLineSegment. This should usually be inverse of shouldDrawLineJumpOnIntersection().

Parameters

currentLineSegment

PointToPointLine

otherLineSegment

PointToPointLine

Returns

boolean


shouldDrawLineJumpOnIntersection()

protected shouldDrawLineJumpOnIntersection(currentLineSegment, otherLineSegment): boolean

Defined in: packages/sprotty/src/graph/views.tsx:224

Whether or not to draw a line jump on an intersection for the currentLineSegment. This should usually be inverse of shouldDrawLineGapOnIntersection().

Parameters

currentLineSegment

PointToPointLine

otherLineSegment

PointToPointLine

Returns

boolean