Constructs an event handler that creates handles for the selection cells.
Variable allowLivePreview
If live preview is allowed on this system. Default is true for systems with SVG support.
Specifies if cloning by control-drag is enabled. Default is true.
Specifies if drop events are interpreted as new connections if no other drop action is defined. Default is false.
Stores the x-coordinate of the current mouse move.
Stores the y-coordinate of the current mouse move.
Specifies if events are handled. Default is true.
Reference to the enclosing Graph.
Holds the Guide instance that is used for alignment.
Specifies if other cells should be used for snapping the right, center or left side of the current selection. Default is false.
Whether the handles of the selection are currently visible.
Specifies if drop targets under the mouse should be enabled. Default is true.
Specifies if the graph container should be used for preview. If this is used then drop target detection relies entirely on Graph#getCellAt because the HTML preview does not "let events through". Default is false.
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.
Maximum number of cells for which live preview should be used. Default is 0 which means no live preview.
Specifies the minimum number of pixels for the width and height of a selection border. Default is 6.
Specifies if moving is enabled. Default is true.
Specifies the color of the preview shape. Default is black.
Specifies if cells may be moved out of their parents. Default is true.
If empty parents should be removed from the model after all child cells have been moved out. Default is true.
Specifies if the bounding box should allow for rotation. Default is true.
Specifies if the grid should be scaled. Default is false.
Specifies if the view should be scrolled so that a moved cell is visible.
Specifies if selecting is enabled. Default is true.
Reference to the Shape that represents the preview.
Specifies if a move cursor should be shown if the mouse is over a movable cell. Default is true.
Static
pluginAdds the states for the given cell recursively to the given dictionary.
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();
}
}
Creates the shape used to draw the preview for the given bounds.
Returns the union of the CellStates for the given array of Cells. 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: GraphView#getBounds and Graph#getBoundingBox.
Array of Cells whose bounding box should be returned.
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.
Hook to return true for delayed selections.
Returns true if the given cell and parent should propagate selection state to the parent.
Returns true if the given cell is a valid drop target.
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.
Handles the event by highlighting possible drop targets and updating the preview.
Handles the event by applying the changes to the selection cells.
Redraws the preview shape for the given states array.
Resets the given preview states array.
Selects the given cell for the given MouseEvent.
Sets wether the handles attached to the given cells are visible.
Array of Cells.
Boolean that specifies if the handles should be visible.
Forces an update of the handler regardless of the last used value.
Returns true if the given parent should be removed after removal of child cells.
Hook for subclassers do show details while the handler is active.
Optional
me: InternalMouseEventReturns true if the guides should be used for the given MouseEvent. This implementation returns Guide#isEnabledForEvent.
Graph event handler that handles selection. Individual cells are handled separately using VertexHandler or one of the edge handlers. These handlers are created using Graph#createHandler in GraphSelectionModel#cellAdded.
To avoid the container to scroll a moved cell into view, set scrollOnMove to
false
.