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.
Updates the preview if cloning state has changed.
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.
Destroy the preview and highlight shapes.
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.
Creates an array of cell states which should be used as guides.
Returns
Hook to return true for delayed selections.
Returns
Returns oveEnabled.
Returns true if the given cell and parent should propagate selection state to the parent.
Returns
Returns
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.
Destroys the handler and all its resources and DOM nodes.
Hooks for subclassers to hide details when the handler gets inactive.
Resets the state of this handler.
Resets the livew preview.
Suspends the livew preview.
Hook for rounding the unscaled vector. This uses Math.round.
Selects the given cell for the given MouseEvent.
Implements the delayed selection for the given mouse event.
Sets
Boolean that specifies the new clone enabled state.
Sets
Sets the color of the rectangle used to highlight drop targets.
String that represents the new highlight color.
Sets oveEnabled.
Sets
Sets
Returns true if the given parent should be removed after removal of child cells.
Suspends the livew preview.
Hook for subclassers do show details while the handler is active.
Optional
me: InternalMouseEventUpdates the bounds of the preview shape.
Updates the bounds of the preview shape.
Updates the bounds of the preview shape.
Returns 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
.