Event handler that selects rectangular regions. This is not built-into mxGraph. To enable rubberband selection in a graph, ssssssssuse the following code.
var rubberband = new mxRubberband(graph);
mxRubberband | Event handler that selects rectangular regions. |
Functions | |
mxRubberband | Constructs an event handler that selects rectangular regions in the graph using rubberband selection. |
Variables | |
defaultOpacity | Specifies the default opacity to be used for the rubberband div. |
enabled | Specifies if events are handled. |
div | Holds the DIV element which is currently visible. |
sharedDiv | Holds the DIV element which is used to display the rubberband. |
currentX | Holds the value of the x argument in the last call to update. |
currentY | Holds the value of the y argument in the last call to update. |
Functions | |
isEnabled | Returns true if events are handled. |
setEnabled | Enables or disables event handling. |
isForceRubberbandEvent | Returns true if the given event forces marquee selection. |
mouseDown | Handles the event by initiating a rubberband selection. |
start | Sets the start point for the rubberband selection. |
mouseMove | Handles the event by updating therubberband selection. |
createShape | Creates the rubberband selection shape. |
mouseUp | Handles the event by selecting the region of the rubberband using mxGraph.selectRegion. |
reset | Resets the state of the rubberband selection. |
update | Sets currentX and currentY and calls repaint. |
repaint | Computes the bounding box and updates the style of the div. |
destroy | Destroys the handler and all its resources and DOM nodes. |
mxRubberband.prototype.currentX
Holds the value of the x argument in the last call to update.
mxRubberband.prototype.currentY
Holds the value of the y argument in the last call to update.
mxRubberband.prototype.isEnabled = function()
Returns true if events are handled. This implementation returns enabled.
mxRubberband.prototype.setEnabled = function( enabled )
Enables or disables event handling. This implementation updates enabled.
mxRubberband.prototype.mouseUp = function( sender, me )
Handles the event by selecting the region of the rubberband using mxGraph.selectRegion.
mxRubberband.prototype.repaint = function()
Computes the bounding box and updates the style of the div.
Constructs an event handler that selects rectangular regions in the graph using rubberband selection.
function mxRubberband( graph )
Specifies the default opacity to be used for the rubberband div.
mxRubberband.prototype.defaultOpacity
Specifies if events are handled.
mxRubberband.prototype.enabled
Holds the DIV element which is currently visible.
mxRubberband.prototype.div
Holds the DIV element which is used to display the rubberband.
mxRubberband.prototype.sharedDiv
Holds the value of the x argument in the last call to update.
mxRubberband.prototype.currentX
Sets currentX and currentY and calls repaint.
mxRubberband.prototype.update = function( x, y )
Holds the value of the y argument in the last call to update.
mxRubberband.prototype.currentY
Returns true if events are handled.
mxRubberband.prototype.isEnabled = function()
Enables or disables event handling.
mxRubberband.prototype.setEnabled = function( enabled )
Returns true if the given event forces marquee selection.
mxRubberband.prototype.isForceRubberbandEvent = function( evt )
Handles the event by initiating a rubberband selection.
mxRubberband.prototype.mouseDown = function( sender, me )
Sets the start point for the rubberband selection.
mxRubberband.prototype.start = function( x, y )
Handles the event by updating therubberband selection.
mxRubberband.prototype.mouseMove = function( sender, me )
Creates the rubberband selection shape.
mxRubberband.prototype.createShape = function()
Handles the event by selecting the region of the rubberband using mxGraph.selectRegion.
mxRubberband.prototype.mouseUp = function( sender, me )
Selects and returns the cells inside the given rectangle for the specified event.
mxGraph.prototype.selectRegion = function( rect, evt )
Resets the state of the rubberband selection.
mxRubberband.prototype.reset = function()
Computes the bounding box and updates the style of the div.
mxRubberband.prototype.repaint = function()
Destroys the handler and all its resources and DOM nodes.
mxRubberband.prototype.destroy = function()