Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • mxGraphHandler

Index

Constructors

constructor

Properties

allCells

allCells: mxDictionary<any>

allowLivePreview

allowLivePreview: boolean

Variable allowLivePreview

If live preview is allowed on this system. Default is true for systems with SVG support.

bounds

bounds: mxRectangle

cell

cell: mxCell

cellCount

cellCount: number

cells

cells: mxCell[]

cloneEnabled

cloneEnabled: boolean

Variable: cloneEnabled

Specifies if cloning by control-drag is enabled. Default is true.

cloning

cloning: boolean

connectOnDrop

connectOnDrop: boolean

Variable: connectOnDrop

Specifies if drop events are interpreted as new connections if no other drop action is defined. Default is false.

currentDx

currentDx: number

Variable: currentDx

Stores the x-coordinate of the current mouse move.

currentDy

currentDy: number

Variable: currentDy

Stores the y-coordinate of the current mouse move.

enabled

enabled: boolean

Variable: enabled

Specifies if events are handled. Default is true.

first

first: mxPoint

graph

graph: mxGraph

Variable: graph

Reference to the enclosing .

guide

guide: mxGuide

Variable: guide

Holds the instance that is used for alignment.

guidesEnabled

guidesEnabled: boolean

Variable: guidesEnabled

Specifies if other cells should be used for snapping the right, center or left side of the current selection. Default is false.

highlightEnabled

highlightEnabled: boolean

Variable: highlightEnabled

Specifies if drop targets under the mouse should be enabled. Default is true.

htmlPreview

htmlPreview: boolean

Variable: htmlPreview

Specifies if the graph container should be used for preview. If this is used then drop target detection relies entirely on <mxGraph.getCellAt> because the HTML preview does not "let events through". Default is false.

maxCells

maxCells: number

Variable: maxCells

Defines the maximum number of cells to paint subhandles for. Default is 50 for Firefox and 20 for IE. Set this to 0 if you want an unlimited number of handles to be displayed. This is only recommended if the number of cells in the graph is limited to a small number, eg. 500.

maxLivePreview

maxLivePreview: number

Variable: maxLivePreview

Maximum number of cells for which live preview should be used. Default is 0 which means no live preview.

minimumSize

minimumSize: number

Variable: minimumSize

Specifies the minimum number of pixels for the width and height of a selection border. Default is 6.

moveEnabled

moveEnabled: boolean

Variable: moveEnabled

Specifies if moving is enabled. Default is true.

pBounds

pBounds: mxRectangle

previewColor

previewColor: string

Variable: previewColor

Specifies the color of the preview shape. Default is black.

removeCellsFromParent

removeCellsFromParent: boolean

Variable: removeCellsFromParent

Specifies if cells may be moved out of their parents. Default is true.

rotationEnabled

rotationEnabled: boolean

Variable: rotationEnabled

Specifies if the bounding box should allow for rotation. Default is true.

scaleGrid

scaleGrid: boolean

Variable: scaleGrid

Specifies if the grid should be scaled. Default is false.

scrollOnMove

scrollOnMove: boolean

Variable: scrollOnMove

Specifies if the view should be scrolled so that a moved cell is visible. Default is true.

selectEnabled

selectEnabled: boolean

Variable: selectEnabled

Specifies if selecting is enabled. Default is true.

shape

shape: mxShape

Variable: shape

Reference to the that represents the preview.

updateCursor

updateCursor: boolean

Variable: updateCursor

Specifies if a move cursor should be shown if the mouse is over a movable cell. Default is true.

Methods

addStates

  • addStates(cell: mxCell, dict: any): number

consumeMouseEvent

  • consumeMouseEvent(evtName: string, me: mxMouseEvent): void
  • Function: consumeMouseEvent

    Consumes the given mouse event. NOTE: This may be used to enable click events for links in labels on iOS as follows as consuming the initial touchStart disables firing the subsequent click evnent on the link.

    consumeMouseEvent(evtName, me) { var source = mxEvent.getSource(me.getEvent());

    if (!mxEvent.isTouchEvent(me.getEvent()) || source.nodeName != 'A') { me.consume(); } }

    Parameters

    Returns void

createPreviewShape

destroy

  • destroy(): void

destroyShapes

  • destroyShapes(): void

getBoundingBox

  • Function: getBoundingBox

    Returns the union of the for the given array of . For vertices, this method uses the bounding box of the corresponding shape if one exists. The bounding box of the corresponding text label and all controls and overlays are ignored. See also: <mxGraphView.getBounds> and <mxGraph.getBoundingBox>.

    Parameters:

    cells - Array of whose bounding box should be returned.

    Parameters

    Returns mxRectangle

getCells

  • Function: getCells

    Returns the cells to be modified by this handler. This implementation returns all selection cells that are movable, or the given initial cell if the given cell is not selected and movable. This handles the case of moving unselectable or unselected cells.

    Parameters:

    initialCell - that triggered this handler.

    Parameters

    Returns mxCell[]

getDelta

getGuideStates

getInitialCellForEvent

getPreviewBounds

isCloneEnabled

  • isCloneEnabled(): boolean

isDelayedSelection

isEnabled

  • isEnabled(): boolean

isMoveEnabled

  • isMoveEnabled(): boolean

isRemoveCellsFromParent

  • isRemoveCellsFromParent(): boolean

isSelectEnabled

  • isSelectEnabled(): boolean

mouseDown

  • Function: mouseDown

    Handles the event by selecing the given cell and creating a handle for it. By consuming the event all subsequent events of the gesture are redirected to this handler.

    Parameters

    Returns void

mouseMove

mouseUp

moveCells

  • moveCells(cells: mxCell[], dx: number, dy: number, clone: boolean, target: mxCell, evt: Event): void

removeHint

  • removeHint(): void

reset

  • reset(): void

roundLength

  • roundLength(length: number): number
  • Function: roundLength

    Hook for rounding the unscaled vector. This uses Math.round.

    Parameters

    • length: number

    Returns number

selectDelayed

setCloneEnabled

  • setCloneEnabled(value: boolean): void
  • Function: setCloneEnabled

    Sets .

    Parameters:

    value - Boolean that specifies the new clone enabled state.

    Parameters

    • value: boolean

    Returns void

setEnabled

  • setEnabled(value: boolean): void

setHighlightColor

  • setHighlightColor(color: string): void
  • Function: setHighlightColor

    Sets the color of the rectangle used to highlight drop targets.

    Parameters:

    color - String that represents the new highlight color.

    Parameters

    • color: string

    Returns void

setMoveEnabled

  • setMoveEnabled(value: boolean): void

setRemoveCellsFromParent

  • setRemoveCellsFromParent(value: boolean): void

setSelectEnabled

  • setSelectEnabled(value: boolean): void

shouldRemoveCellsFromParent

  • shouldRemoveCellsFromParent(parent: mxCell, cells: mxCell[], evt: Event): boolean
  • Function: shouldRemoveCellsFromParent

    Returns true if the given cells should be removed from the parent for the specified mousereleased event.

    Parameters

    Returns boolean

snap

start

  • start(cell: mxCell, x: number, y: number): void

updateHint

updatePreviewShape

  • updatePreviewShape(): void

useGuidesForEvent

  • Function: useGuidesForEvent

    Returns true if the guides should be used for the given . This implementation returns <mxGuide.isEnabledForEvent>.

    Parameters

    Returns boolean

Generated using TypeDoc