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

Class. Polyline Edge View With Gaps on Intersections

skipOffsetAfter

protected skipOffsetAfter: number = 3

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

Overrides

JumpingPolylineEdgeView.skipOffsetAfter


skipOffsetBefore

protected skipOffsetBefore: number = 3

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

Overrides

JumpingPolylineEdgeView.skipOffsetBefore

Methods

createGapPath()

protected createGapPath(intersectionPoint, lineSegment): string

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

Parameters

intersectionPoint

Point

lineSegment

PointToPointLine

Returns

string

Overrides

JumpingPolylineEdgeView.createGapPath


createJumpPath()

protected createJumpPath(intersectionPoint, lineSegment): string

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

Parameters

intersectionPoint

Point

lineSegment

PointToPointLine

Returns

string

Inherited from

JumpingPolylineEdgeView.createJumpPath


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[]

Inherited from

JumpingPolylineEdgeView.getIntersectionsSortedBySegmentDirection


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

Inherited from

JumpingPolylineEdgeView.getLineSegment


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

Inherited from

JumpingPolylineEdgeView.getOtherLineSegment


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

Inherited from

JumpingPolylineEdgeView.intersectionPath


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

JumpingPolylineEdgeView.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

JumpingPolylineEdgeView.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

JumpingPolylineEdgeView.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

JumpingPolylineEdgeView.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

JumpingPolylineEdgeView.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

Inherited from

JumpingPolylineEdgeView.renderLine


shouldDrawLineGapOnIntersection()

protected shouldDrawLineGapOnIntersection(currentLineSegment, otherLineSegment): boolean

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

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

Overrides

JumpingPolylineEdgeView.shouldDrawLineGapOnIntersection


shouldDrawLineJumpOnIntersection()

protected shouldDrawLineJumpOnIntersection(currentLineSegment, otherLineSegment): boolean

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

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

Overrides

JumpingPolylineEdgeView.shouldDrawLineJumpOnIntersection