Class ElbowEdgeHandler

Graph event handler that reconnects edges and modifies control points and the edge label location. Uses CellMarker for finding and highlighting new source and target vertices. This handler is automatically created in Graph.createHandler. It extends EdgeHandler.

Constructor: mxEdgeHandler

Constructs an edge handler for the specified CellState.

CellState of the cell to be modified.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

abspoints: (null | Point)[] = []
active: boolean = true
addEnabled: boolean = false

Specifies if adding bends by shift-click is enabled.

Note: This experimental feature is not recommended for production use.

false
allowHandleBoundsCheck: boolean = true

Specifies if the bounds of handles should be used for hit-detection in IE.

true
bends: Shape[] = []

Holds the Shapes that represent the points.

cloneEnabled: boolean = true

Specifies if cloning by control-drag is enabled.

true
constraintHandler: ConstraintHandler

Holds the ConstraintHandler used for drawing and highlighting constraints.

currentPoint: null | Point = null
customHandles: undefined | CellHandle[]
dblClickRemoveEnabled: boolean = false

Specifies if removing bends by double click is enabled.

false
doubleClickOrientationResource: string = ...

Specifies the resource key for the tooltip to be displayed on the single control point for routed edges. If the resource for this key does not exist then the value is used as the error message.

'doubleClickOrientation'.
error: null | string = null

Holds the current validation error while a connection is being changed.

escapeHandler: ((sender: Listenable, evt: Event) => void)
flipEnabled: boolean = true

Specifies if a double click on the middle handle should call Graph#flipEdge.

true
graph: Graph

Reference to the enclosing Graph.

handleImage: null | ImageBox = null

Optional Image to be used as handles.

null
index: null | number = null
isLabel: boolean = false
isSource: boolean = false
isTarget: boolean = false
label: Point
labelHandleImage: null | ImageBox = null
labelShape: Shape

Holds the Shape that represents the label position.

manageLabelHandle: boolean = false

Specifies if the label handle should be moved if it intersects with another handle. Uses checkLabelHandle for checking and moving.

false
marker: CellMarker

Holds the CellMarker which is used for highlighting terminals.

mergeRemoveEnabled: boolean = false

Specifies if removing bends by dropping them on other bends is enabled.

false
outline: boolean = true
outlineConnect: boolean = false

Specifies if connections to the outline of a highlighted target should be enabled. This will allow to place the connection point along the outline of the highlighted target.

false
parentHighlight: null | RectangleShape = null
parentHighlightEnabled: boolean = false

Specifies if the parent should be highlighted if a child cell is selected.

false
points: Point[] = []
preferHtml: boolean = false

Specifies if bends should be added to the graph container. This is updated in init based on whether the edge or one of its terminals has an HTML label in the container.

removeEnabled: boolean = false

Specifies if removing bends by shift-click is enabled.

Note: This experimental feature is not recommended for production use.

false
shape: Shape

Holds the Shape that represents the preview edge.

snapPoint: null | Point = null
snapToTerminals: boolean = false

Specifies if waypoints should snap to the routing centers of terminals.

false
startX: number = 0
startY: number = 0
state: CellState

Reference to the CellState being modified.

straightRemoveEnabled: boolean = false

Specifies if removing bends by creating straight segments should be enabled. If enabled, this can be overridden by holding down the alt key while moving.

false
tolerance: number = 0

Optional tolerance for hit-detection in getHandleForEvent.

0
virtualBendOpacity: number = 20

Opacity to be used for virtual bends (see virtualBendsEnabled).

20
virtualBends: undefined | Shape[]
virtualBendsEnabled: boolean = false

Specifies if virtual bends should be added in the center of each segment. These bends can then be used to add new waypoints.

false

Methods

  • Changes the terminal or terminal point of the given edge in the graph model.

    Parameters

    • edge: Cell

      Cell that represents the edge to be reconnected.

    • terminal: Cell

      Cell that represents the new terminal.

    • isSource: boolean

      Boolean indicating if the new terminal is the source or target terminal.

    • isClone: boolean

      Boolean indicating if the new connection should be a clone of the old edge.

    • me: InternalMouseEvent

      MouseEvent that contains the mouse up event.

    Returns Cell

  • Helper method to initialize the given bend.

    Parameters

    • bend: Shape

      Shape that represents the bend to be initialized.

    • OptionaldblClick: ((evt: MouseEvent) => void)
        • (evt): void
        • Parameters

          • evt: MouseEvent

          Returns void

    Returns void

  • Changes the coordinates for the label of the given edge.

    Parameters

    • edgeState: CellState
    • x: number

      Integer that specifies the x-coordinate of the new location.

    • y: number

      Integer that specifies the y-coordinate of the new location.

    Returns void

  • Destroys the handler and all its resources and DOM nodes. This does normally not need to be called as handlers are destroyed automatically when the corresponding cell is deselected.

    Returns void