mxEdgeHandler

Graph event handler that reconnects edges and modifies control points and the edge label location.  Uses <mxTerminalMarker> for finding and highlighting new source and target vertices.  This handler is automatically created in mxGraph.createHandler for each selected edge.

To enable adding/removing control points, the following code can be used

mxEdgeHandler.prototype.addEnabled = true;
mxEdgeHandler.prototype.removeEnabled = true;

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

Summary
mxEdgeHandlerGraph event handler that reconnects edges and modifies control points and the edge label location.
Functions
mxEdgeHandlerConstructs an edge handler for the specified mxCellState.
Variables
graphReference to the enclosing mxGraph.
stateReference to the mxCellState being modified.
markerHolds the <mxTerminalMarker> which is used for highlighting terminals.
constraintHandlerHolds the mxConstraintHandler used for drawing and highlighting constraints.
errorHolds the current validation error while a connection is being changed.
shapeHolds the mxShape that represents the preview edge.
bendsHolds the mxShapes that represent the points.
labelShapeHolds the mxShape that represents the label position.
cloneEnabledSpecifies if cloning by control-drag is enabled.
addEnabledSpecifies if adding bends by shift-click is enabled.
removeEnabledSpecifies if removing bends by shift-click is enabled.
dblClickRemoveEnabledSpecifies if removing bends by double click is enabled.
mergeRemoveEnabledSpecifies if removing bends by dropping them on other bends is enabled.
straightRemoveEnabledSpecifies if removing bends by creating straight segments should be enabled.
virtualBendsEnabledSpecifies if virtual bends should be added in the center of each segments.
virtualBendOpacityOpacity to be used for virtual bends (see virtualBendsEnabled).
parentHighlightEnabledSpecifies if the parent should be highlighted if a child cell is selected.
preferHtmlSpecifies if bends should be added to the graph container.
allowHandleBoundsCheckSpecifies if the bounds of handles should be used for hit-detection in IE Default is true.
snapToTerminalsSpecifies if waypoints should snap to the routing centers of terminals.
handleImageOptional mxImage to be used as handles.
toleranceOptional tolerance for hit-detection in getHandleForEvent.
outlineConnectSpecifies if connections to the outline of a highlighted target should be enabled.
manageLabelHandleSpecifies if the label handle should be moved if it intersects with another handle.
Functions
initInitializes the shapes required for this edge handler.
isParentHighlightVisibleReturns true if the parent highlight should be visible.
updateParentHighlightUpdates the highlight of the parent if parentHighlightEnabled is true.
createCustomHandlesReturns an array of custom handles.
isVirtualBendsEnabledReturns true if virtual bends should be added.
isCellEnabledReturns true if the given cell allows new connections to be created.
isAddPointEventReturns true if the given event is a trigger to add a new point.
isRemovePointEventReturns true if the given event is a trigger to remove a point.
getSelectionPointsReturns the list of points that defines the selection stroke.
createParentHighlightShapeCreates the shape used to draw the selection border.
createSelectionShapeCreates the shape used to draw the selection border.
getSelectionColorReturns mxConstants.EDGE_SELECTION_COLOR.
getSelectionStrokeWidthReturns mxConstants.EDGE_SELECTION_STROKEWIDTH.
isSelectionDashedReturns <mxConstants.EDGE_SELECTION_DASHED>.
isConnectableCellReturns true if the given cell is connectable.
getCellAtCreates and returns the mxCellMarker used in marker.
createMarkerCreates and returns the mxCellMarker used in marker.
validateConnectionReturns the error message or an empty string if the connection for the given source, target pair is not valid.
createBendsCreates and returns the bends used for modifying the edge.
createVirtualBendsCreates and returns the bends used for modifying the edge.
isHandleEnabledCreates the shape used to display the given bend.
isHandleVisibleReturns true if the handle at the given index is visible.
createHandleShapeCreates the shape used to display the given bend.
createLabelHandleShapeCreates the shape used to display the the label handle.
initBendHelper method to initialize the given bend.
getHandleForEventReturns the index of the handle for the given event.
isAddVirtualBendEventReturns true if the given event allows virtual bends to be added.
isCustomHandleEventReturns true if the given event allows custom handles to be changed.
mouseDownHandles the event by checking if a special element of the handler was clicked, in which case the index parameter is non-null.
startStarts the handling of the mouse gesture.
clonePreviewStateReturns a clone of the current preview state for the given point and terminal.
getSnapToTerminalToleranceReturns the tolerance for the guides.
updateHintHook for subclassers do show details while the handler is active.
removeHintHooks for subclassers to hide details when the handler gets inactive.
roundLengthHook for rounding the unscaled width or height.
isSnapToTerminalsEventReturns true if snapToTerminals is true and if alt is not pressed.
getPointForEventReturns the point for the given event.
getPreviewTerminalStateUpdates the given preview state taking into account the state of the constraint handler.
getPreviewPointsUpdates the given preview state taking into account the state of the constraint handler.
isOutlineConnectEventReturns true if outlineConnect is true and the source of the event is the outline shape or shift is pressed.
updatePreviewStateUpdates the given preview state taking into account the state of the constraint handler.
mouseMoveHandles the event by updating the preview.
mouseUpHandles the event to applying the previewed changes on the edge by using moveLabel, connect or changePoints.
resetResets the state of this handler.
setPreviewColorSets the color of the preview to the given value.
convertPointConverts the given point in-place from screen to unscaled, untranslated graph coordinates and applies the grid.
moveLabelChanges the coordinates for the label of the given edge.
connectChanges the terminal or terminal point of the given edge in the graph model.
changeTerminalPointChanges the terminal point of the given edge.
changePointsChanges the control points of the given edge in the graph model.
addPointAdds a control point for the given state and event.
addPointAtAdds a control point at the given point.
removePointRemoves the control point at the given index from the given state.
getHandleFillColorReturns the fillcolor for the handle at the given index.
redrawRedraws the preview, and the bends- and label control points.
redrawHandlesRedraws the handles.
isCustomHandleVisibleReturns true if the given custom handle is visible.
hideHandlesShortcut to <hideSizers>.
redrawInnerBendsUpdates and redraws the inner bends.
checkLabelHandleChecks if the label handle intersects the given bounds and moves it if it intersects.
drawPreviewRedraws the preview.
refreshRefreshes the bends of this handler.
isDestroyedReturns true if destroy was called.
destroyBendsDestroys all elements in bends.
destroyDestroys the handler and all its resources and DOM nodes.

Functions

mxEdgeHandler

function mxEdgeHandler(state)

Constructs an edge handler for the specified mxCellState.

Parameters

statemxCellState of the cell to be handled.

Variables

graph

mxEdgeHandler.prototype.graph

Reference to the enclosing mxGraph.

state

mxEdgeHandler.prototype.state

Reference to the mxCellState being modified.

marker

mxEdgeHandler.prototype.marker

Holds the <mxTerminalMarker> which is used for highlighting terminals.

constraintHandler

mxEdgeHandler.prototype.constraintHandler

Holds the mxConstraintHandler used for drawing and highlighting constraints.

error

mxEdgeHandler.prototype.error

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

shape

mxEdgeHandler.prototype.shape

Holds the mxShape that represents the preview edge.

bends

mxEdgeHandler.prototype.bends

Holds the mxShapes that represent the points.

labelShape

mxEdgeHandler.prototype.labelShape

Holds the mxShape that represents the label position.

cloneEnabled

mxEdgeHandler.prototype.cloneEnabled

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

addEnabled

mxEdgeHandler.prototype.addEnabled

Specifies if adding bends by shift-click is enabled.  Default is false.  Note: This experimental feature is not recommended for production use.

removeEnabled

mxEdgeHandler.prototype.removeEnabled

Specifies if removing bends by shift-click is enabled.  Default is false.  Note: This experimental feature is not recommended for production use.

dblClickRemoveEnabled

mxEdgeHandler.prototype.dblClickRemoveEnabled

Specifies if removing bends by double click is enabled.  Default is false.

mergeRemoveEnabled

mxEdgeHandler.prototype.mergeRemoveEnabled

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

straightRemoveEnabled

mxEdgeHandler.prototype.straightRemoveEnabled

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.  Default is false.

virtualBendsEnabled

mxEdgeHandler.prototype.virtualBendsEnabled

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

virtualBendOpacity

mxEdgeHandler.prototype.virtualBendOpacity

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

parentHighlightEnabled

mxEdgeHandler.prototype.parentHighlightEnabled

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

preferHtml

mxEdgeHandler.prototype.preferHtml

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.

allowHandleBoundsCheck

mxEdgeHandler.prototype.allowHandleBoundsCheck

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

snapToTerminals

mxEdgeHandler.prototype.snapToTerminals

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

handleImage

mxEdgeHandler.prototype.handleImage

Optional mxImage to be used as handles.  Default is null.

tolerance

mxEdgeHandler.prototype.tolerance

Optional tolerance for hit-detection in getHandleForEvent.  Default is 0.

outlineConnect

mxEdgeHandler.prototype.outlineConnect

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.  Default is false.

manageLabelHandle

mxEdgeHandler.prototype.manageLabelHandle

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

Functions

init

mxEdgeHandler.prototype.init = function()

Initializes the shapes required for this edge handler.

isParentHighlightVisible

Returns true if the parent highlight should be visible.  This implementation always returns true.

updateParentHighlight

Updates the highlight of the parent if parentHighlightEnabled is true.

createCustomHandles

mxEdgeHandler.prototype.createCustomHandles = function()

Returns an array of custom handles.  This implementation returns null.

isVirtualBendsEnabled

mxEdgeHandler.prototype.isVirtualBendsEnabled = function(evt)

Returns true if virtual bends should be added.  This returns true if virtualBendsEnabled is true and the current style allows and renders custom waypoints.

isCellEnabled

mxEdgeHandler.prototype.isCellEnabled = function(cell)

Returns true if the given cell allows new connections to be created.  This implementation always returns true.

isAddPointEvent

mxEdgeHandler.prototype.isAddPointEvent = function(evt)

Returns true if the given event is a trigger to add a new point.  This implementation returns true if shift is pressed.

isRemovePointEvent

mxEdgeHandler.prototype.isRemovePointEvent = function(evt)

Returns true if the given event is a trigger to remove a point.  This implementation returns true if shift is pressed.

getSelectionPoints

mxEdgeHandler.prototype.getSelectionPoints = function(state)

Returns the list of points that defines the selection stroke.

createParentHighlightShape

mxEdgeHandler.prototype.createParentHighlightShape = function(bounds)

Creates the shape used to draw the selection border.

createSelectionShape

mxEdgeHandler.prototype.createSelectionShape = function(points)

Creates the shape used to draw the selection border.

getSelectionColor

mxEdgeHandler.prototype.getSelectionColor = function()

Returns mxConstants.EDGE_SELECTION_COLOR.

getSelectionStrokeWidth

mxEdgeHandler.prototype.getSelectionStrokeWidth = function()

Returns mxConstants.EDGE_SELECTION_STROKEWIDTH.

isSelectionDashed

mxEdgeHandler.prototype.isSelectionDashed = function()

Returns <mxConstants.EDGE_SELECTION_DASHED>.

isConnectableCell

mxEdgeHandler.prototype.isConnectableCell = function(cell)

Returns true if the given cell is connectable.  This is a hook to disable floating connections.  This implementation returns true.

getCellAt

mxEdgeHandler.prototype.getCellAt = function(x,
y)

Creates and returns the mxCellMarker used in marker.

createMarker

mxEdgeHandler.prototype.createMarker = function()

Creates and returns the mxCellMarker used in marker.

validateConnection

mxEdgeHandler.prototype.validateConnection = function(source,
target)

Returns the error message or an empty string if the connection for the given source, target pair is not valid.  Otherwise it returns null.  This implementation uses mxGraph.getEdgeValidationError.

Parameters

sourcemxCell that represents the source terminal.
targetmxCell that represents the target terminal.

createBends

mxEdgeHandler.prototype.createBends = function()

Creates and returns the bends used for modifying the edge.  This is typically an array of mxRectangleShapes.

createVirtualBends

mxEdgeHandler.prototype.createVirtualBends = function()

Creates and returns the bends used for modifying the edge.  This is typically an array of mxRectangleShapes.

isHandleEnabled

mxEdgeHandler.prototype.isHandleEnabled = function(index)

Creates the shape used to display the given bend.

isHandleVisible

mxEdgeHandler.prototype.isHandleVisible = function(index)

Returns true if the handle at the given index is visible.

createHandleShape

mxEdgeHandler.prototype.createHandleShape = function(index)

Creates the shape used to display the given bend.  Note that the index may be null for special cases, such as when called from mxElbowEdgeHandler.createVirtualBend.  Only images and rectangles should be returned if support for HTML labels with not foreign objects is required.  Index if null for virtual handles.

createLabelHandleShape

mxEdgeHandler.prototype.createLabelHandleShape = function()

Creates the shape used to display the the label handle.

initBend

mxEdgeHandler.prototype.initBend = function(bend,
dblClick)

Helper method to initialize the given bend.

Parameters

bendmxShape that represents the bend to be initialized.

getHandleForEvent

mxEdgeHandler.prototype.getHandleForEvent = function(me)

Returns the index of the handle for the given event.

isAddVirtualBendEvent

mxEdgeHandler.prototype.isAddVirtualBendEvent = function(me)

Returns true if the given event allows virtual bends to be added.  This implementation returns true.

isCustomHandleEvent

mxEdgeHandler.prototype.isCustomHandleEvent = function(me)

Returns true if the given event allows custom handles to be changed.  This implementation returns true.

mouseDown

mxEdgeHandler.prototype.mouseDown = function(sender,
me)

Handles the event by checking if a special element of the handler was clicked, in which case the index parameter is non-null.  The indices may be one of <LABEL_HANDLE> or the number of the respective control point.  The source and target points are used for reconnecting the edge.

start

mxEdgeHandler.prototype.start = function(x,
y,
index)

Starts the handling of the mouse gesture.

clonePreviewState

mxEdgeHandler.prototype.clonePreviewState = function(point,
terminal)

Returns a clone of the current preview state for the given point and terminal.

getSnapToTerminalTolerance

mxEdgeHandler.prototype.getSnapToTerminalTolerance = function()

Returns the tolerance for the guides.  Default value is gridSize * scale / 2.

updateHint

mxEdgeHandler.prototype.updateHint = function(me,
point)

Hook for subclassers do show details while the handler is active.

removeHint

mxEdgeHandler.prototype.removeHint = function()

Hooks for subclassers to hide details when the handler gets inactive.

roundLength

mxEdgeHandler.prototype.roundLength = function(length)

Hook for rounding the unscaled width or height.  This uses Math.round.

isSnapToTerminalsEvent

mxEdgeHandler.prototype.isSnapToTerminalsEvent = function(me)

Returns true if snapToTerminals is true and if alt is not pressed.

getPointForEvent

mxEdgeHandler.prototype.getPointForEvent = function(me)

Returns the point for the given event.

getPreviewTerminalState

mxEdgeHandler.prototype.getPreviewTerminalState = function(me)

Updates the given preview state taking into account the state of the constraint handler.

getPreviewPoints

mxEdgeHandler.prototype.getPreviewPoints = function(pt,
me)

Updates the given preview state taking into account the state of the constraint handler.

Parameters

ptmxPoint that contains the current pointer position.
meOptional mxMouseEvent that contains the current event.

isOutlineConnectEvent

mxEdgeHandler.prototype.isOutlineConnectEvent = function(me)

Returns true if outlineConnect is true and the source of the event is the outline shape or shift is pressed.

updatePreviewState

mxEdgeHandler.prototype.updatePreviewState = function(edge,
point,
terminalState,
me,
outline)

Updates the given preview state taking into account the state of the constraint handler.

mouseMove

mxEdgeHandler.prototype.mouseMove = function(sender,
me)

Handles the event by updating the preview.

mouseUp

mxEdgeHandler.prototype.mouseUp = function(sender,
me)

Handles the event to applying the previewed changes on the edge by using moveLabel, connect or changePoints.

reset

mxEdgeHandler.prototype.reset = function()

Resets the state of this handler.

setPreviewColor

mxEdgeHandler.prototype.setPreviewColor = function(color)

Sets the color of the preview to the given value.

convertPoint

mxEdgeHandler.prototype.convertPoint = function(point,
gridEnabled)

Converts the given point in-place from screen to unscaled, untranslated graph coordinates and applies the grid.  Returns the given, modified point instance.

Parameters

pointmxPoint to be converted.
gridEnabledBoolean that specifies if the grid should be applied.

moveLabel

mxEdgeHandler.prototype.moveLabel = function(edgeState,
x,
y)

Changes the coordinates for the label of the given edge.

Parameters

edgemxCell that represents the edge.
xInteger that specifies the x-coordinate of the new location.
yInteger that specifies the y-coordinate of the new location.

connect

mxEdgeHandler.prototype.connect = function(edge,
terminal,
isSource,
isClone,
me)

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

Parameters

edgemxCell that represents the edge to be reconnected.
terminalmxCell that represents the new terminal.
isSourceBoolean indicating if the new terminal is the source or target terminal.
isCloneBoolean indicating if the new connection should be a clone of the old edge.
memxMouseEvent that contains the mouse up event.

changeTerminalPoint

mxEdgeHandler.prototype.changeTerminalPoint = function(edge,
point,
isSource,
clone)

Changes the terminal point of the given edge.

changePoints

mxEdgeHandler.prototype.changePoints = function(edge,
points,
clone)

Changes the control points of the given edge in the graph model.

addPoint

mxEdgeHandler.prototype.addPoint = function(state,
evt)

Adds a control point for the given state and event.

addPointAt

mxEdgeHandler.prototype.addPointAt = function(state,
x,
y)

Adds a control point at the given point.

removePoint

mxEdgeHandler.prototype.removePoint = function(state,
index)

Removes the control point at the given index from the given state.

getHandleFillColor

mxEdgeHandler.prototype.getHandleFillColor = function(index)

Returns the fillcolor for the handle at the given index.

redraw

mxEdgeHandler.prototype.redraw = function(ignoreHandles)

Redraws the preview, and the bends- and label control points.

redrawHandles

mxEdgeHandler.prototype.redrawHandles = function()

Redraws the handles.

isCustomHandleVisible

mxEdgeHandler.prototype.isCustomHandleVisible = function(handle)

Returns true if the given custom handle is visible.

hideHandles

Shortcut to <hideSizers>.

redrawInnerBends

mxEdgeHandler.prototype.redrawInnerBends = function(p0,
pe)

Updates and redraws the inner bends.

Parameters

p0mxPoint that represents the location of the first point.
pemxPoint that represents the location of the last point.

checkLabelHandle

mxEdgeHandler.prototype.checkLabelHandle = function(b)

Checks if the label handle intersects the given bounds and moves it if it intersects.

drawPreview

mxEdgeHandler.prototype.drawPreview = function()

Redraws the preview.

refresh

mxEdgeHandler.prototype.refresh = function()

Refreshes the bends of this handler.

isDestroyed

mxEdgeHandler.prototype.isDestroyed = function()

Returns true if destroy was called.

destroyBends

mxEdgeHandler.prototype.destroyBends = function(bends)

Destroys all elements in bends.

destroy

mxEdgeHandler.prototype.destroy = function()

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.

function mxEdgeHandler(state)
Constructs an edge handler for the specified mxCellState.
Represents the current state of a cell in a given mxGraphView.
mxEdgeHandler.prototype.graph
Reference to the enclosing mxGraph.
Extends mxEventSource to implement a graph component for the browser.
mxEdgeHandler.prototype.state
Reference to the mxCellState being modified.
mxEdgeHandler.prototype.marker
Holds the mxTerminalMarker which is used for highlighting terminals.
mxEdgeHandler.prototype.constraintHandler
Holds the mxConstraintHandler used for drawing and highlighting constraints.
Handles constraints on connection targets.
mxEdgeHandler.prototype.error
Holds the current validation error while a connection is being changed.
mxEdgeHandler.prototype.shape
Holds the mxShape that represents the preview edge.
Base class for all shapes.
mxEdgeHandler.prototype.bends
Holds the mxShapes that represent the points.
mxEdgeHandler.prototype.labelShape
Holds the mxShape that represents the label position.
mxEdgeHandler.prototype.cloneEnabled
Specifies if cloning by control-drag is enabled.
mxEdgeHandler.prototype.addEnabled
Specifies if adding bends by shift-click is enabled.
mxEdgeHandler.prototype.removeEnabled
Specifies if removing bends by shift-click is enabled.
mxEdgeHandler.prototype.dblClickRemoveEnabled
Specifies if removing bends by double click is enabled.
mxEdgeHandler.prototype.mergeRemoveEnabled
Specifies if removing bends by dropping them on other bends is enabled.
mxEdgeHandler.prototype.straightRemoveEnabled
Specifies if removing bends by creating straight segments should be enabled.
mxEdgeHandler.prototype.virtualBendsEnabled
Specifies if virtual bends should be added in the center of each segments.
mxEdgeHandler.prototype.virtualBendOpacity
Opacity to be used for virtual bends (see virtualBendsEnabled).
mxEdgeHandler.prototype.parentHighlightEnabled
Specifies if the parent should be highlighted if a child cell is selected.
mxEdgeHandler.prototype.preferHtml
Specifies if bends should be added to the graph container.
mxEdgeHandler.prototype.allowHandleBoundsCheck
Specifies if the bounds of handles should be used for hit-detection in IE Default is true.
mxEdgeHandler.prototype.snapToTerminals
Specifies if waypoints should snap to the routing centers of terminals.
mxEdgeHandler.prototype.handleImage
Optional mxImage to be used as handles.
Encapsulates the URL, width and height of an image.
mxEdgeHandler.prototype.tolerance
Optional tolerance for hit-detection in getHandleForEvent.
mxEdgeHandler.prototype.getHandleForEvent = function(me)
Returns the index of the handle for the given event.
mxEdgeHandler.prototype.outlineConnect
Specifies if connections to the outline of a highlighted target should be enabled.
mxEdgeHandler.prototype.manageLabelHandle
Specifies if the label handle should be moved if it intersects with another handle.
mxEdgeHandler.prototype.init = function()
Initializes the shapes required for this edge handler.
mxEdgeHandler.prototype.createCustomHandles = function()
Returns an array of custom handles.
mxEdgeHandler.prototype.isVirtualBendsEnabled = function(evt)
Returns true if virtual bends should be added.
mxEdgeHandler.prototype.isCellEnabled = function(cell)
Returns true if the given cell allows new connections to be created.
mxEdgeHandler.prototype.isAddPointEvent = function(evt)
Returns true if the given event is a trigger to add a new point.
mxEdgeHandler.prototype.isRemovePointEvent = function(evt)
Returns true if the given event is a trigger to remove a point.
mxEdgeHandler.prototype.getSelectionPoints = function(state)
Returns the list of points that defines the selection stroke.
mxEdgeHandler.prototype.createParentHighlightShape = function(bounds)
Creates the shape used to draw the selection border.
mxEdgeHandler.prototype.createSelectionShape = function(points)
Creates the shape used to draw the selection border.
mxEdgeHandler.prototype.getSelectionColor = function()
Returns mxConstants.EDGE_SELECTION_COLOR.
EDGE_SELECTION_COLOR: '#00FF00'
Defines the color to be used for the selection border of edges.
mxEdgeHandler.prototype.getSelectionStrokeWidth = function()
Returns mxConstants.EDGE_SELECTION_STROKEWIDTH.
EDGE_SELECTION_STROKEWIDTH: 1
Defines the strokewidth to be used for edge selections.
mxEdgeHandler.prototype.isSelectionDashed = function()
Returns mxConstants.EDGE_SELECTION_DASHED.
mxEdgeHandler.prototype.isConnectableCell = function(cell)
Returns true if the given cell is connectable.
mxEdgeHandler.prototype.getCellAt = function(x,
y)
Creates and returns the mxCellMarker used in marker.
A helper class to process mouse locations and highlight cells.
mxEdgeHandler.prototype.createMarker = function()
Creates and returns the mxCellMarker used in marker.
mxEdgeHandler.prototype.validateConnection = function(source,
target)
Returns the error message or an empty string if the connection for the given source, target pair is not valid.
mxEdgeHandler.prototype.createBends = function()
Creates and returns the bends used for modifying the edge.
mxEdgeHandler.prototype.createVirtualBends = function()
Creates and returns the bends used for modifying the edge.
mxEdgeHandler.prototype.isHandleEnabled = function(index)
Creates the shape used to display the given bend.
mxEdgeHandler.prototype.isHandleVisible = function(index)
Returns true if the handle at the given index is visible.
mxEdgeHandler.prototype.createHandleShape = function(index)
Creates the shape used to display the given bend.
mxEdgeHandler.prototype.createLabelHandleShape = function()
Creates the shape used to display the the label handle.
mxEdgeHandler.prototype.initBend = function(bend,
dblClick)
Helper method to initialize the given bend.
mxEdgeHandler.prototype.isAddVirtualBendEvent = function(me)
Returns true if the given event allows virtual bends to be added.
mxEdgeHandler.prototype.isCustomHandleEvent = function(me)
Returns true if the given event allows custom handles to be changed.
mxEdgeHandler.prototype.mouseDown = function(sender,
me)
Handles the event by checking if a special element of the handler was clicked, in which case the index parameter is non-null.
mxEdgeHandler.prototype.start = function(x,
y,
index)
Starts the handling of the mouse gesture.
mxEdgeHandler.prototype.clonePreviewState = function(point,
terminal)
Returns a clone of the current preview state for the given point and terminal.
mxEdgeHandler.prototype.getSnapToTerminalTolerance = function()
Returns the tolerance for the guides.
mxEdgeHandler.prototype.updateHint = function(me,
point)
Hook for subclassers do show details while the handler is active.
mxEdgeHandler.prototype.removeHint = function()
Hooks for subclassers to hide details when the handler gets inactive.
mxEdgeHandler.prototype.roundLength = function(length)
Hook for rounding the unscaled width or height.
mxEdgeHandler.prototype.isSnapToTerminalsEvent = function(me)
Returns true if snapToTerminals is true and if alt is not pressed.
mxEdgeHandler.prototype.getPointForEvent = function(me)
Returns the point for the given event.
mxEdgeHandler.prototype.getPreviewTerminalState = function(me)
Updates the given preview state taking into account the state of the constraint handler.
mxEdgeHandler.prototype.getPreviewPoints = function(pt,
me)
Updates the given preview state taking into account the state of the constraint handler.
mxEdgeHandler.prototype.isOutlineConnectEvent = function(me)
Returns true if outlineConnect is true and the source of the event is the outline shape or shift is pressed.
mxEdgeHandler.prototype.updatePreviewState = function(edge,
point,
terminalState,
me,
outline)
Updates the given preview state taking into account the state of the constraint handler.
mxEdgeHandler.prototype.mouseMove = function(sender,
me)
Handles the event by updating the preview.
mxEdgeHandler.prototype.mouseUp = function(sender,
me)
Handles the event to applying the previewed changes on the edge by using moveLabel, connect or changePoints.
mxEdgeHandler.prototype.moveLabel = function(edgeState,
x,
y)
Changes the coordinates for the label of the given edge.
mxEdgeHandler.prototype.connect = function(edge,
terminal,
isSource,
isClone,
me)
Changes the terminal or terminal point of the given edge in the graph model.
mxEdgeHandler.prototype.changePoints = function(edge,
points,
clone)
Changes the control points of the given edge in the graph model.
mxEdgeHandler.prototype.reset = function()
Resets the state of this handler.
mxEdgeHandler.prototype.setPreviewColor = function(color)
Sets the color of the preview to the given value.
mxEdgeHandler.prototype.convertPoint = function(point,
gridEnabled)
Converts the given point in-place from screen to unscaled, untranslated graph coordinates and applies the grid.
mxEdgeHandler.prototype.changeTerminalPoint = function(edge,
point,
isSource,
clone)
Changes the terminal point of the given edge.
mxEdgeHandler.prototype.addPoint = function(state,
evt)
Adds a control point for the given state and event.
mxEdgeHandler.prototype.addPointAt = function(state,
x,
y)
Adds a control point at the given point.
mxEdgeHandler.prototype.removePoint = function(state,
index)
Removes the control point at the given index from the given state.
mxEdgeHandler.prototype.getHandleFillColor = function(index)
Returns the fillcolor for the handle at the given index.
mxEdgeHandler.prototype.redraw = function(ignoreHandles)
Redraws the preview, and the bends- and label control points.
mxEdgeHandler.prototype.redrawHandles = function()
Redraws the handles.
mxEdgeHandler.prototype.isCustomHandleVisible = function(handle)
Returns true if the given custom handle is visible.
mxEdgeHandler.prototype.redrawInnerBends = function(p0,
pe)
Updates and redraws the inner bends.
mxEdgeHandler.prototype.checkLabelHandle = function(b)
Checks if the label handle intersects the given bounds and moves it if it intersects.
mxEdgeHandler.prototype.drawPreview = function()
Redraws the preview.
mxEdgeHandler.prototype.refresh = function()
Refreshes the bends of this handler.
mxEdgeHandler.prototype.isDestroyed = function()
Returns true if destroy was called.
mxEdgeHandler.prototype.destroy = function()
Destroys the handler and all its resources and DOM nodes.
mxEdgeHandler.prototype.destroyBends = function(bends)
Destroys all elements in bends.
mxGraph.prototype.createHandler = function(state)
Creates a new handler for the given cell state.
mxGraph.prototype.getEdgeValidationError = function(edge,
source,
target)
Returns the validation error message to be displayed when inserting or changing an edges’ connectivity.
Cells are the elements of the graph model.
Extends mxShape to implement a rectangle shape.
mxElbowEdgeHandler.prototype.createVirtualBend = function(dblClickHandler)
Creates a virtual bend that supports double clicking and calls mxGraph.flipEdge.
Implements a 2-dimensional vector with double precision coordinates.
Base class for all mouse events in mxGraph.
Close