maxGraph/docs/api/classes/RubberBandHandler.html

55 lines
48 KiB
HTML
Raw Normal View History

Finish converting core to ts, JSDoc conversion, consistency+convention changes, example bugfixes (#70) * reorganised directories; removed mx prefix * reduced directory hierarchies; removed mx prefix; type fixes * convert remaining javascript to ts * fix/add types * add type defs * type updates; moved codecs to where they're used * reorganise constants into enums+type additions * removed "Function:" and "Variable:" prefixes from comments, as they aren't needed in JSDoc * removed "Function:", "Variable:" and "Class:" prefixes from comments, as they aren't needed in JSDoc * removed "Function:" prefixes from comments, as they aren't needed in JSDoc * minor changes * convert code example blocks to markdown * module casing updates * converted parameter function documentation to JSDoc * documentation+type updates * removed react subdir (for now) * reorganised various `utils` functions into different files * type updates/bugfixes/workarounds * rename Rubberband and CellEditor to be *Handler to match the other plugins * move codec classes to where they're used to reduce cyclic dependencies * move codec classes to where they're used to reduce cyclic dependencies * type updates/reorganize layout file structure * renamed various files for consistency * import fixes * renamed GraphHandler SelectionHander and various fixes * convert EventObject parameters to objects * add basic better-docs config * update better-docs config * bugfix for shared variables in Graph persisting across instances * fixed accessing handlers in examples; renamed Model to GraphModel * fixed accessing handlers in examples; renamed Model to GraphModel * restored selection model * bugfix * renamed getModel to getDataModel * changed to use graph.batchUpdate() to reduce lines of code * changed to use graph.batchUpdate() to reduce lines of code * finished annotations+added TypeDoc * convert remaining Cell[] instances to CellArray * convert NaturalDocs links to JSDoc
2022-01-08 01:49:35 +00:00
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RubberBandHandler | @maxgraph/core</title><meta name="description" content="Documentation for @maxgraph/core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@maxgraph/core</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@maxgraph/core</a></li><li><a href="RubberBandHandler.html">RubberBandHandler</a></li></ul><h1>Class RubberBandHandler</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Event handler that selects rectangular regions.
This is not built-into [mxGraph].
To enable rubberband selection in a graph, use the following code.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">RubberBandHandler</span></li></ul></section><section class="tsd-panel"><h3>Implements</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">GraphPlugin</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="RubberBandHandler.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#currentX" class="tsd-kind-icon">currentX</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#currentY" class="tsd-kind-icon">currentY</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#defaultOpacity" class="tsd-kind-icon">default<wbr/>Opacity</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#destroyed" class="tsd-kind-icon">destroyed</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#div" class="tsd-kind-icon">div</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#dragHandler" class="tsd-kind-icon">drag<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#dropHandler" class="tsd-kind-icon">drop<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#fadeOut" class="tsd-kind-icon">fade<wbr/>Out</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#first" class="tsd-kind-icon">first</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#forceRubberbandHandler" class="tsd-kind-icon">force<wbr/>Rubberband<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#gestureHandler" class="tsd-kind-icon">gesture<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#graph" class="tsd-kind-icon">graph</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#height" class="tsd-kind-icon">height</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#panHandler" class="tsd-kind-icon">pan<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#sharedDiv" class="tsd-kind-icon">shared<wbr/>Div</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#width" class="tsd-kind-icon">width</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#x" class="tsd-kind-icon">x</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#y" class="tsd-kind-icon">y</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="RubberBandHandler.html#pluginId" class="tsd-kind-icon">plugin<wbr/>Id</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="RubberBandHandler.html#createShape" class="tsd-kind-icon">create<wbr/>Shape</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="RubberBandHandler.html#execute" class="tsd-kind-icon">execute</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="RubberBandHandler.html#isActive" class="tsd-kind-icon">is<wbr/>Active</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="RubberBa
<p>Holds the value of the x argument in the last call to <update>.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="currentY" class="tsd-anchor"></a><h3>currentY</h3><div class="tsd-signature tsd-kind-icon">currentY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L113">view/handler/RubberBandHandler.ts:113</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the value of the y argument in the last call to <update>.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="defaultOpacity" class="tsd-anchor"></a><h3>default<wbr/>Opacity</h3><div class="tsd-signature tsd-kind-icon">default<wbr/>Opacity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 20</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L88">view/handler/RubberBandHandler.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies the default opacity to be used for the rubberband div. Default is 20.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="destroyed" class="tsd-anchor"></a><h3>destroyed</h3><div class="tsd-signature tsd-kind-icon">destroyed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L76">view/handler/RubberBandHandler.ts:76</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="div" class="tsd-anchor"></a><h3>div</h3><div class="tsd-signature tsd-kind-icon">div<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L98">view/handler/RubberBandHandler.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the DIV element which is currently visible.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="dragHandler" class="tsd-anchor"></a><h3>drag<wbr/>Handler</h3><div class="tsd-signature tsd-kind-icon">drag<wbr/>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>evt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MouseEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L77">view/handler/RubberBandHandler.ts:77</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="dropHandler" class="tsd-anchor"></a><h3>drop<wbr/>Handler</h3><div class="tsd-signature tsd-kind-icon">drop<wbr/>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>evt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MouseEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L78">view/handler/RubberBandHandler.ts:78</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L93">view/handler/RubberBandHandler.ts:93</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if events are handled. Default is true.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="fadeOut" class="tsd-anchor"></a><h3>fade<wbr/>Out</h3><div class="tsd-signature tsd-kind-icon">fade<wbr/>Out<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L118">view/handler/RubberBandHandler.ts:118</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional fade out effect. Default is false.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="first" class="tsd-anchor"></a><h3>first</h3><div class="tsd-signature tsd-kind-icon">first<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L75">view/handler/RubberBandHandler.ts:75</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="forceRubberbandHandler" class="tsd-anchor"></a><h3>force<wbr/>Rubberband<wbr/>Handler</h3><div class="tsd-signature tsd-kind-icon">force<wbr/>Rubberband<wbr/>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Function</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L71">view/handler/RubberBandHandler.ts:71</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="gestureHandler" class="tsd-anchor"></a><h3>gesture<wbr/>Handler</h3><div class="tsd-signature tsd-kind-icon">gesture<wbr/>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Function</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L73">view/handler/RubberBandHandler.ts:73</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="graph" class="tsd-anchor"></a><h3>graph</h3><div class="tsd-signature tsd-kind-icon">graph<span class="tsd-signature-symbol">:</span> <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L74">view/handler/RubberBandHandler.ts:74</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="height" class="tsd-anchor"></a><h3>height</h3><div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L83">view/handler/RubberBandHandler.ts:83</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="panHandler" class="tsd-anchor"></a><h3>pan<wbr/>Handler</h3><div class="tsd-signature tsd-kind-icon">pan<wbr/>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Function</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L72">view/handler/RubberBandHandler.ts:72</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="sharedDiv" class="tsd-anchor"></a><h3>shared<wbr/>Div</h3><div class="tsd-signature tsd-kind-icon">shared<wbr/>Div<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L103">view/handler/RubberBandHandler.ts:103</a></li></ul><
<p>Holds the DIV element which is used to display the rubberband.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="width" class="tsd-anchor"></a><h3>width</h3><div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L82">view/handler/RubberBandHandler.ts:82</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="x" class="tsd-anchor"></a><h3>x</h3><div class="tsd-signature tsd-kind-icon">x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L80">view/handler/RubberBandHandler.ts:80</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="y" class="tsd-anchor"></a><h3>y</h3><div class="tsd-signature tsd-kind-icon">y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L81">view/handler/RubberBandHandler.ts:81</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"><a id="pluginId" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> plugin<wbr/>Id</h3><div class="tsd-signature tsd-kind-icon">plugin<wbr/>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;RubberBandHandler&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L31">view/handler/RubberBandHandler.ts:31</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="createShape" class="tsd-anchor"></a><h3>create<wbr/>Shape</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">create<wbr/>Shape<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L241">view/handler/RubberBandHandler.ts:241</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates the rubberband selection shape.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLElement</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="execute" class="tsd-anchor"></a><h3>execute</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">execute<span class="tsd-signature-symbol">(</span>evt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MouseEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L283">view/handler/RubberBandHandler.ts:283</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Resets the state of this handler and selects the current region
for the given event.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>evt: <span class="tsd-signature-type">MouseEvent</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isActive" class="tsd-anchor"></a><h3>is<wbr/>Active</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Active<span class="tsd-signature-symbol">(</span>sender<span class="tsd-signature-symbol">?: </span><a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a>, me<span class="tsd-signature-symbol">?: </span><a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L261">view/handler/RubberBandHandler.ts:261</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if this handler is active.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> sender: <a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> me: <a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isEnabled" class="tsd-anchor"></a><h3>is<wbr/>Enabled</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L123">view/handler/RubberBandHandler.ts:123</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates the rubberband selection shape.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isForceRubberbandEvent" class="tsd-anchor"></a><h3>is<wbr/>Force<wbr/>Rubberband<wbr/>Event</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Force<wbr/>Rubberband<wbr/>Event<span class="tsd-signature-symbol">(</span>me<span class="tsd-signature-symbol">: </span><a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L139">view/handler/RubberBandHandler.ts:139</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if the given {@link MouseEvent} should start rubberband selection.
This implementation returns true if the alt key is pressed.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>me: <a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="mouseDown" class="tsd-anchor"></a><h3>mouse<wbr/>Down</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">mouse<wbr/>Down<span class="tsd-signature-symbol">(</span>sender<span class="tsd-signature-symbol">: </span><a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a>, me<span class="tsd-signature-symbol">: </span><a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L148">view/handler/RubberBandHandler.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<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><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>sender: <a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a></h5></li><li><h5>me: <a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="mouseMove" class="tsd-anchor"></a><h3>mouse<wbr/>Move</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">mouse<wbr/>Move<span class="tsd-signature-symbol">(</span>sender<span class="tsd-signature-symbol">: </span><a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a>, me<span class="tsd-signature-symbol">: </span><a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L211">view/handler/RubberBandHandler.ts:211</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Handles the event by updating therubberband selection.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>sender: <a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a></h5></li><li><h5>me: <a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="mouseUp" class="tsd-anchor"></a><h3>mouse<wbr/>Up</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">mouse<wbr/>Up<span class="tsd-signature-symbol">(</span>sender<span class="tsd-signature-symbol">: </span><a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a>, me<span class="tsd-signature-symbol">: </span><a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L269">view/handler/RubberBandHandler.ts:269</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Handles the event by selecting the region of the rubberband using
{@link Graph#selectRegion}.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>sender: <a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a></h5></li><li><h5>me: <a href="InternalMouseEvent.html" class="tsd-signature-type" data-tsd-kind="Class">InternalMouseEvent</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="onDestroy" class="tsd-anchor"></a><h3>on<wbr/>Destroy</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">on<wbr/>Destroy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of GraphPlugin.onDestroy</p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L360">view/handler/RubberBandHandler.ts:360</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<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><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="repaint" class="tsd-anchor"></a><h3>repaint</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">repaint<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L335">view/handler/RubberBandHandler.ts:335</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Computes the bounding box and updates the style of the <div>.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="reset" class="tsd-anchor"></a><h3>reset</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">reset<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L291">view/handler/RubberBandHandler.ts:291</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Resets the state of the rubberband selection.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setEnabled" class="tsd-anchor"></a><h3>set<wbr/>Enabled</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Enabled<span class="tsd-signature-symbol">(</span>enabled<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L131">view/handler/RubberBandHandler.ts:131</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Enables or disables event handling. This implementation updates
<enabled>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>enabled: <span class="tsd-signature-type">boolean</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="start" class="tsd-anchor"></a><h3>start</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L174">view/handler/RubberBandHandler.ts:174</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates the rubberband selection shape.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>x: <span class="tsd-signature-type">number</span></h5></li><li><h5>y: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a><h3>update</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/handler/RubberBandHandler.ts#L325">view/handler/RubberBandHandler.ts:325</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets <currentX> and <currentY> and calls <repaint>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>x: <span class="tsd-signature-type">number</span></h5></li><li><h5>y: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/DomHelpers.html">Dom<wbr/>Helpers</a></li><li class=" tsd-kind-namespace"><a href="../modules/cloneUtils.html">clone<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/constants.html">constants</a></li><li class=" tsd-kind-namespace"><a href="../modules/domUtils.html">dom<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/eventUtils.html">event<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/gestureUtils.html">gesture<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/mathUtils.html">math<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/stringUtils.html">string<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/styleUtils.html">style<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/utils.html">utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/xmlUtils.html">xml<wbr/>Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="RubberBandHandler.html" class="tsd-kind-icon">Rubber<wbr/>Band<wbr/>Handler</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="RubberBandHandler.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#currentX" class="tsd-kind-icon">currentX</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#currentY" class="tsd-kind-icon">currentY</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#defaultOpacity" class="tsd-kind-icon">default<wbr/>Opacity</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#destroyed" class="tsd-kind-icon">destroyed</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#div" class="tsd-kind-icon">div</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#dragHandler" class="tsd-kind-icon">drag<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#dropHandler" class="tsd-kind-icon">drop<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#fadeOut" class="tsd-kind-icon">fade<wbr/>Out</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#first" class="tsd-kind-icon">first</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#forceRubberbandHandler" class="tsd-kind-icon">force<wbr/>Rubberband<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#gestureHandler" class="tsd-kind-icon">gesture<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#graph" class="tsd-kind-icon">graph</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#height" class="tsd-kind-icon">height</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#panHandler" class="tsd-kind-icon">pan<wbr/>Handler</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="RubberBandHandler.html#sharedDiv" class="tsd-kind-icon">shared<wbr/>Div</a></li><li class="tsd-kind-property