Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConstraintHandler

Handles constraints on connection targets. This class is in charge of showing fixed points when the mouse is over a vertex and handles constraints to establish new connections.

Hierarchy

  • ConstraintHandler

Index

Constructors

constructor

Properties

constraints

constraints: null | ConnectionConstraint[] = null

currentConstraint

currentConstraint: null | ConnectionConstraint = null

currentFocus

currentFocus: null | CellState = null

currentFocusArea

currentFocusArea: null | Rectangle = null

currentPoint

currentPoint: null | Point = null

enabled

enabled: boolean = true

Specifies if events are handled. Default is true.

focusHighlight

focusHighlight: null | RectangleShape = null

focusIcons

focusIcons: ImageShape[] = []

focusPoints

focusPoints: Point[] = []

graph

graph: Graph

Reference to the enclosing {@link mxGraph}.

highlightColor

highlightColor: string = DEFAULT_VALID_COLOR

Specifies the color for the highlight. Default is DEFAULT_VALID_COLOR.

mouseleaveHandler

mouseleaveHandler: null | (() => void) = null

pointImage

pointImage: ImageBox = ...

{@link Image} to be used as the image for fixed connection points.

resetHandler

resetHandler: () => void

Type declaration

    • (): void
    • Returns void

Methods

createHighlightShape

destroyFocusHighlight

  • destroyFocusHighlight(): void

destroyIcons

  • destroyIcons(): void

getCellForEvent

getImageForConstraint

getTolerance

  • Returns the tolerance to be used for intersecting connection points. This implementation returns {@link mxGraph.tolerance}.

    Parameters

    Returns number

intersects

  • intersects(icon: ImageShape, mouse: Rectangle, source: boolean, existingEdge: boolean): boolean

isEnabled

  • isEnabled(): boolean

isEventIgnored

isKeepFocusEvent

isStateIgnored

  • isStateIgnored(state: CellState, source?: boolean): boolean

onDestroy

  • onDestroy(): void

redraw

  • redraw(): void
  • Transfers the focus to the given state as a source or target terminal. If the handler is not enabled then the outline is painted, but the constraints are ignored.

    Returns void

reset

  • reset(): void

setEnabled

  • setEnabled(enabled: boolean): void

setFocus

update

Generated using TypeDoc