maxGraph/docs/api/classes/UndoManager.html

60 lines
37 KiB
HTML

<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>UndoManager | @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="UndoManager.html">UndoManager</a></li></ul><h1>Class UndoManager</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="EventSource.html" class="tsd-signature-type" data-tsd-kind="Class">EventSource</a><ul class="tsd-hierarchy"><li><span class="target">UndoManager</span></li></ul></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 tsd-is-overwrite"><a href="UndoManager.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 tsd-is-inherited"><a href="UndoManager.html#eventListeners" class="tsd-kind-icon">event<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#eventSource" class="tsd-kind-icon">event<wbr/>Source</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#eventsEnabled" class="tsd-kind-icon">events<wbr/>Enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#history" class="tsd-kind-icon">history</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#indexOfNextAdd" class="tsd-kind-icon">index<wbr/>Of<wbr/>Next<wbr/>Add</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#size" class="tsd-kind-icon">size</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 tsd-is-inherited"><a href="UndoManager.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#canRedo" class="tsd-kind-icon">can<wbr/>Redo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#canUndo" class="tsd-kind-icon">can<wbr/>Undo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#clear" class="tsd-kind-icon">clear</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#fireEvent" class="tsd-kind-icon">fire<wbr/>Event</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#getEventSource" class="tsd-kind-icon">get<wbr/>Event<wbr/>Source</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#isEmpty" class="tsd-kind-icon">is<wbr/>Empty</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#isEventsEnabled" class="tsd-kind-icon">is<wbr/>Events<wbr/>Enabled</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#redo" class="tsd-kind-icon">redo</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#setEventSource" class="tsd-kind-icon">set<wbr/>Event<wbr/>Source</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#setEventsEnabled" class="tsd-kind-icon">set<wbr/>Events<wbr/>Enabled</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#trim" class="tsd-kind-icon">trim</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#undo" class="tsd-kind-icon">undo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#undoableEditHappened" class="tsd-kind-icon">undoable<wbr/>Edit<wbr/>Happened</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Undo<wbr/>Manager<span class="tsd-signature-symbol">(</span>size<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><a href="UndoManager.html" class="tsd-signature-type" data-tsd-kind="Class">UndoManager</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/undoable_changes/UndoManager.ts#L77">view/undoable_changes/UndoManager.ts:77</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>size: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 100</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="UndoManager.html" class="tsd-signature-type" data-tsd-kind="Class">UndoManager</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="eventListeners" class="tsd-anchor"></a><h3>event<wbr/>Listeners</h3><div class="tsd-signature tsd-kind-icon">event<wbr/>Listeners<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventListenerObject</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#eventListeners">eventListeners</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L45">view/event/EventSource.ts:45</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the event names and associated listeners in an array. The array
contains the event name followed by the respective listener for each
registered listener.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="eventSource" class="tsd-anchor"></a><h3>event<wbr/>Source</h3><div class="tsd-signature tsd-kind-icon">event<wbr/>Source<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#eventSource">eventSource</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L55">view/event/EventSource.ts:55</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional source for events. Default is null.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="eventsEnabled" class="tsd-anchor"></a><h3>events<wbr/>Enabled</h3><div class="tsd-signature tsd-kind-icon">events<wbr/>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"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#eventsEnabled">eventsEnabled</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L50">view/event/EventSource.ts:50</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if events can be fired. Default is true.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="history" class="tsd-anchor"></a><h3>history</h3><div class="tsd-signature tsd-kind-icon">history<span class="tsd-signature-symbol">:</span> <a href="UndoableEdit.html" class="tsd-signature-type" data-tsd-kind="Class">UndoableEdit</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/undoable_changes/UndoManager.ts#L93">view/undoable_changes/UndoManager.ts:93</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Array that contains the steps of the command history.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="indexOfNextAdd" class="tsd-anchor"></a><h3>index<wbr/>Of<wbr/>Next<wbr/>Add</h3><div class="tsd-signature tsd-kind-icon">index<wbr/>Of<wbr/>Next<wbr/>Add<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/undoable_changes/UndoManager.ts#L98">view/undoable_changes/UndoManager.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Index of the element to be added next.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="size" class="tsd-anchor"></a><h3>size</h3><div class="tsd-signature tsd-kind-icon">size<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 100</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/undoable_changes/UndoManager.ts#L88">view/undoable_changes/UndoManager.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Maximum command history size. 0 means unlimited history. Default is
100.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>100</p>
</dd></dl></div></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 tsd-is-inherited"><a id="addListener" class="tsd-anchor"></a><h3>add<wbr/>Listener</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, funct<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</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>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L91">view/event/EventSource.ts:91</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Binds the specified function to the given event name. If no event name
is given, then the listener is registered for all events.</p>
</div><div><p>The parameters of the listener are the sender and an <a href="EventObject.html">EventObject</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>funct: <span class="tsd-signature-type">Function</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="canRedo" class="tsd-anchor"></a><h3>can<wbr/>Redo</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">can<wbr/>Redo<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/undoable_changes/UndoManager.ts#L141">view/undoable_changes/UndoManager.ts:141</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if a redo is possible.</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="canUndo" class="tsd-anchor"></a><h3>can<wbr/>Undo</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">can<wbr/>Undo<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/undoable_changes/UndoManager.ts#L119">view/undoable_changes/UndoManager.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if an undo is possible.</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="clear" class="tsd-anchor"></a><h3>clear</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">clear<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/undoable_changes/UndoManager.ts#L110">view/undoable_changes/UndoManager.ts:110</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Clears the command history.</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 tsd-is-inherited"><a id="fireEvent" class="tsd-anchor"></a><h3>fire<wbr/>Event</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">fire<wbr/>Event<span class="tsd-signature-symbol">(</span>evt<span class="tsd-signature-symbol">: </span><a href="EventObject.html" class="tsd-signature-type" data-tsd-kind="Class">EventObject</a>, sender<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</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>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#fireEvent">fireEvent</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L125">view/event/EventSource.ts:125</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Dispatches the given event to the listeners which are registered for
the event. The sender argument is optional. The current execution scope
(&quot;this&quot;) is used for the listener invocation (see {@link Utils#bind}).</p>
</div><div><p>Example:</p>
<pre><code class="language-javascript"><span class="hl-2">fireEvent</span><span class="hl-1">(</span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">mxEventObject</span><span class="hl-1">(</span><span class="hl-6">&quot;eventName&quot;</span><span class="hl-1">, </span><span class="hl-0">key1</span><span class="hl-1">, </span><span class="hl-0">val1</span><span class="hl-1">, .., </span><span class="hl-0">keyN</span><span class="hl-1">, </span><span class="hl-0">valN</span><span class="hl-1">))</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>evt: <a href="EventObject.html" class="tsd-signature-type" data-tsd-kind="Class">EventObject</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="EventObject.html">EventObject</a> that represents the event.</p>
</div></div></li><li><h5>sender: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional sender to be passed to the listener. Default value is
the return value of <getEventSource>.</p>
</div></div></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 tsd-is-inherited"><a id="getEventSource" class="tsd-anchor"></a><h3>get<wbr/>Event<wbr/>Source</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">get<wbr/>Event<wbr/>Source<span class="tsd-signature-symbol">(</span><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">EventTarget</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#getEventSource">getEventSource</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L74">view/event/EventSource.ts:74</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns <eventSource>.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isEmpty" class="tsd-anchor"></a><h3>is<wbr/>Empty</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Empty<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/undoable_changes/UndoManager.ts#L103">view/undoable_changes/UndoManager.ts:103</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if the history is empty.</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 tsd-is-inherited"><a id="isEventsEnabled" class="tsd-anchor"></a><h3>is<wbr/>Events<wbr/>Enabled</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">is<wbr/>Events<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"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#isEventsEnabled">isEventsEnabled</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L60">view/event/EventSource.ts:60</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns <eventsEnabled>.</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="redo" class="tsd-anchor"></a><h3>redo</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">redo<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/undoable_changes/UndoManager.ts#L148">view/undoable_changes/UndoManager.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Redoes the last change.</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 tsd-is-inherited"><a id="removeListener" class="tsd-anchor"></a><h3>remove<wbr/>Listener</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol">(</span>funct<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</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>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L98">view/event/EventSource.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Removes all occurrences of the given listener from <eventListeners>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>funct: <span class="tsd-signature-type">Function</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 tsd-is-inherited"><a id="setEventSource" class="tsd-anchor"></a><h3>set<wbr/>Event<wbr/>Source</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">set<wbr/>Event<wbr/>Source<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</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>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#setEventSource">setEventSource</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L81">view/event/EventSource.ts:81</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets <eventSource>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</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 tsd-is-inherited"><a id="setEventsEnabled" class="tsd-anchor"></a><h3>set<wbr/>Events<wbr/>Enabled</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">set<wbr/>Events<wbr/>Enabled<span class="tsd-signature-symbol">(</span>value<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"><p>Inherited from <a href="EventSource.html">EventSource</a>.<a href="EventSource.html#setEventsEnabled">setEventsEnabled</a></p><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/event/EventSource.ts#L67">view/event/EventSource.ts:67</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets <eventsEnabled>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <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="trim" class="tsd-anchor"></a><h3>trim</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">trim<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/undoable_changes/UndoManager.ts#L181">view/undoable_changes/UndoManager.ts:181</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Removes all pending steps after <indexOfNextAdd> from the history,
invoking die on each edit. This is called from <undoableEditHappened>.</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="undo" class="tsd-anchor"></a><h3>undo</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">undo<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/undoable_changes/UndoManager.ts#L126">view/undoable_changes/UndoManager.ts:126</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Undoes the last change.</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="undoableEditHappened" class="tsd-anchor"></a><h3>undoable<wbr/>Edit<wbr/>Happened</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">undoable<wbr/>Edit<wbr/>Happened<span class="tsd-signature-symbol">(</span>undoableEdit<span class="tsd-signature-symbol">: </span><a href="UndoableEdit.html" class="tsd-signature-type" data-tsd-kind="Class">UndoableEdit</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/undoable_changes/UndoManager.ts#L165">view/undoable_changes/UndoManager.ts:165</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Method to be called to add new undoable edits to the <history>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>undoableEdit: <a href="UndoableEdit.html" class="tsd-signature-type" data-tsd-kind="Class">UndoableEdit</a></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="UndoManager.html" class="tsd-kind-icon">Undo<wbr/>Manager</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="UndoManager.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#eventListeners" class="tsd-kind-icon">event<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#eventSource" class="tsd-kind-icon">event<wbr/>Source</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#eventsEnabled" class="tsd-kind-icon">events<wbr/>Enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#history" class="tsd-kind-icon">history</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#indexOfNextAdd" class="tsd-kind-icon">index<wbr/>Of<wbr/>Next<wbr/>Add</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="UndoManager.html#size" class="tsd-kind-icon">size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#canRedo" class="tsd-kind-icon">can<wbr/>Redo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#canUndo" class="tsd-kind-icon">can<wbr/>Undo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#clear" class="tsd-kind-icon">clear</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#fireEvent" class="tsd-kind-icon">fire<wbr/>Event</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#getEventSource" class="tsd-kind-icon">get<wbr/>Event<wbr/>Source</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#isEmpty" class="tsd-kind-icon">is<wbr/>Empty</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#isEventsEnabled" class="tsd-kind-icon">is<wbr/>Events<wbr/>Enabled</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#redo" class="tsd-kind-icon">redo</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#setEventSource" class="tsd-kind-icon">set<wbr/>Event<wbr/>Source</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="UndoManager.html#setEventsEnabled" class="tsd-kind-icon">set<wbr/>Events<wbr/>Enabled</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#trim" class="tsd-kind-icon">trim</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#undo" class="tsd-kind-icon">undo</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="UndoManager.html#undoableEditHappened" class="tsd-kind-icon">undoable<wbr/>Edit<wbr/>Happened</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>