<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxRubberband"></a>mxRubberband</h1><divclass=CBody><p>Event handler that selects rectangular regions. This is not built-into <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link28onMouseOver="ShowTip(event, 'tt22', 'link28')"onMouseOut="HideTip('tt22')">mxGraph</a>. To enable rubberband selection in a graph, ssssssssuse the following code.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var rubberband = new mxRubberband(graph);</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxRubberband">mxRubberband</a></td><tdclass=SDescription>Event handler that selects rectangular regions. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRubberband.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRubberband.mxRubberband"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxRubberband</a></td><tdclass=SDescription>Constructs an event handler that selects rectangular regions in the graph using rubberband selection.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRubberband.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRubberband.defaultOpacity"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">defaultOpacity</a></td><tdclass=SDescription>Specifies the default opacity to be used for the rubberband div. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxRubberband.enabled"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">enabled</a></td><tdclass=SDescription>Specifies if events are handled. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRubberband.div"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">div</a></td><tdclass=SDescription>Holds the DIV element which is currently visible.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxRubberband.sharedDiv"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">sharedDiv</a></td><tdclass=SDescription>Holds the DIV element which is used to display the rubberband.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRubberband.currentX"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">currentX</a></td><tdclass=SDescription>Holds the value of the x argument in the last call to <ahref="#mxRubberband.update"class=LFunctionid=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">update</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxRubberband.currentY"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">currentY</a></td><tdclass=SDescription>Holds the value of the y argument in the last call to <ahref="#mxRubberband.update"class=LFunctionid=link9onMouseOver="ShowTip(event, 'tt7', 'link9')"onMouseOut="HideTip('tt7')">update</a>.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRubberband.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRubberband.isEnabled"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">isEnabled</a></td><tdclass=SDescription>Returns true if events are handled. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxRubberband.setEnabled"id=link11onMouseOver="ShowTip(event, 'tt10', 'link11')"onMouseOut="HideTip('tt10')">setEnabled</a></td><tdclass=SDescription>Enables or disables event handling. </td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SE
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.mxRubberband"></a>mxRubberband</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxRubberband(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs an event handler that selects rectangular regions in the graph using rubberband selection.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.defaultOpacity"></a>defaultOpacity</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.defaultOpacity</td></tr></table></blockquote><p>Specifies the default opacity to be used for the rubberband div. Default is 20.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.enabled"></a>enabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.enabled</td></tr></table></blockquote><p>Specifies if events are handled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.div"></a>div</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.div</td></tr></table></blockquote><p>Holds the DIV element which is currently visible.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.sharedDiv"></a>sharedDiv</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.sharedDiv</td></tr></table></blockquote><p>Holds the DIV element which is used to display the rubberband.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.currentX"></a>currentX</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.currentX</td></tr></table></blockquote><p>Holds the value of the x argument in the last call to <ahref="#mxRubberband.update"class=LFunctionid=link29onMouseOver="ShowTip(event, 'tt7', 'link29')"onMouseOut="HideTip('tt7')">update</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.currentY"></a>currentY</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.currentY</td></tr></table></blockquote><p>Holds the value of the y argument in the last call to <ahref="#mxRubberband.update"class=LFunctionid=link30onMouseOver="ShowTip(event, 'tt7', 'link30')"onMouseOut="HideTip('tt7')">update</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.isEnabled"></a>isEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.isEnabled = function()</td></tr></table></blockquote><p>Returns true if events are handled. This implementation returns <ahref="#mxRubberband.enabled"class=LVariableid=link31onMouseOver="ShowTip(event, 'tt3', 'link31')"onMouseOut="HideTip('tt3')">enabled</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.isForceRubberbandEvent"></a>isForceRubberbandEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.isForceRubberbandEvent = function(</td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link33onMouseOver="ShowTip(event, 'tt12', 'link33')"onMouseOut="HideTip('tt12')">mxMouseEvent</a> should start rubberband selection. This implementation returns true if the alt key is pressed.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.mouseDown"></a>mouseDown</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.mouseDown = function(</td><tdclass=PParameternowrap>sender,</td></tr><tr><td></td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by initiating a rubberband selection. By consuming the event all subsequent events of the gesture are redirected to this handler.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.start"></a>start</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.start = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the start point for the rubberband selection.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.mouseMove"></a>mouseMove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.mouseMove = function(</td><tdclass=PParameternowrap>sender,</td></tr><tr><td></td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by updating therubberband selection.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.createShape"></a>createShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.createShape = function()</td></tr></table></blockquote><p>Creates the rubberband selection shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.mouseUp"></a>mouseUp</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.mouseUp = function(</td><tdclass=PParameternowrap>sender,</td></tr><tr><td></td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by selecting the region of the rubberband using <ahref="../view/mxGraph-js.html#mxGraph.selectRegion"class=LFunctionid=link34onMouseOver="ShowTip(event, 'tt18', 'link34')"onMouseOut="HideTip('tt18')">mxGraph.selectRegion</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.reset = function()</td></tr></table></blockquote><p>Resets the state of the rubberband selection.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.repaint"></a>repaint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.repaint = function()</td></tr></table></blockquote><p>Computes the bounding box and updates the style of the <ahref="#mxRubberband.div"class=LVariableid=link38onMouseOver="ShowTip(event, 'tt4', 'link38')"onMouseOut="HideTip('tt4')">div</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRubberband.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys the handler and all its resources and DOM nodes. This does normally not need to be called, it is called automatically when the window unloads.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxRubberband(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs an event handler that selects rectangular regions in the graph using rubberband selection.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.defaultOpacity</td></tr></table></blockquote>Specifies the default opacity to be used for the rubberband div. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.enabled</td></tr></table></blockquote>Specifies if events are handled. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.div</td></tr></table></blockquote>Holds the DIV element which is currently visible.</div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.sharedDiv</td></tr></table></blockquote>Holds the DIV element which is used to display the rubberband.</div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.currentX</td></tr></table></blockquote>Holds the value of the x argument in the last call to update.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.update = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets currentX and currentY and calls repaint.</div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.currentY</td></tr></table></blockquote>Holds the value of the y argument in the last call to update.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxRubberband.prototype.isEnabled = function()</td></tr></table></blockquote>Returns true if events are handled. </div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.setEnabled = function(</td><tdclass=PParameternowrap>enabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Enables or disables event handling. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxRubberband.prototype.isForceRubberbandEvent = function(</td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns true if the given mxMouseEvent should start rubberband selection. </div></div><divclass=CToolTipid="tt12"><divclass=CClass>Base class for all mouse events in mxGraph. </div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><ta