maxGraph/docs/api/classes/GraphDataModel.html

447 lines
144 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>GraphDataModel | @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="GraphDataModel.html">GraphDataModel</a></li></ul><h1>Class GraphDataModel</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>Extends <a href="EventSource.html">EventSource</a> to implement a graph model. The graph model acts as
a wrapper around the cells which are in charge of storing the actual graph
datastructure. The model acts as a transactional wrapper with event
notification for all changes, whereas the cells contain the atomic
operations for updating the actual datastructure.</p>
</div><div>
<a href="#layers" id="layers" style="color: inherit; text-decoration: none;">
<h3>Layers</h3>
</a>
<p>The cell hierarchy in the model must have a top-level root cell which
contains the layers (typically one default layer), which in turn contain the
top-level cells of the layers. This means each cell is contained in a layer.
If no layers are required, then all new cells should be added to the default
layer.</p>
<p>Layers are useful for hiding and showing groups of cells, or for placing
groups of cells on top of other cells in the display. To identify a layer,
the <a href="GraphDataModel.html#isLayer">isLayer</a> function is used. It returns true if the parent of the given
cell is the root of the model.</p>
<a href="#events" id="events" style="color: inherit; text-decoration: none;">
<h3>Events</h3>
</a>
<p>See events section for more details. There is a new set of events for
tracking transactional changes as they happen. The events are called
startEdit for the initial beginUpdate, executed for each executed change
and endEdit for the terminal endUpdate. The executed event contains a
property called change which represents the change after execution.</p>
<a href="#encoding-the-model" id="encoding-the-model" style="color: inherit; text-decoration: none;">
<h3>Encoding the model</h3>
</a>
<a href="#to-encode-a-graph-model-use-the-following-code" id="to-encode-a-graph-model-use-the-following-code" style="color: inherit; text-decoration: none;">
<h4>To encode a graph model, use the following code:</h4>
</a>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">enc</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">node</span><span class="hl-1"> = </span><span class="hl-0">enc</span><span class="hl-1">.</span><span class="hl-2">encode</span><span class="hl-1">(</span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDataModel</span><span class="hl-1">());</span>
</code></pre>
<p>This will create an XML node that contains all the model information.</p>
<a href="#encoding-and-decoding-changes" id="encoding-and-decoding-changes" style="color: inherit; text-decoration: none;">
<h4>Encoding and decoding changes:</h4>
</a>
<p>For the encoding of changes, a graph model listener is required that encodes
each change from the given array of changes.</p>
<pre><code class="language-javascript"><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">addListener</span><span class="hl-1">(</span><span class="hl-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">CHANGE</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1">(</span><span class="hl-0">sender</span><span class="hl-1">, </span><span class="hl-0">evt</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">changes</span><span class="hl-1"> = </span><span class="hl-0">evt</span><span class="hl-1">.</span><span class="hl-2">getProperty</span><span class="hl-1">(</span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">).</span><span class="hl-0">changes</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">nodes</span><span class="hl-1"> = [];</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><br/><span class="hl-1"> </span><span class="hl-5">for</span><span class="hl-1"> (</span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">i</span><span class="hl-1"> = </span><span class="hl-8">0</span><span class="hl-1">; </span><span class="hl-0">i</span><span class="hl-1"> &lt; </span><span class="hl-0">changes</span><span class="hl-1">.</span><span class="hl-0">length</span><span class="hl-1">; </span><span class="hl-0">i</span><span class="hl-1">++)</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">nodes</span><span class="hl-1">.</span><span class="hl-2">push</span><span class="hl-1">(</span><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">encode</span><span class="hl-1">(</span><span class="hl-0">changes</span><span class="hl-1">[</span><span class="hl-0">i</span><span class="hl-1">]));</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-4">// do something with the nodes</span><br/><span class="hl-1">});</span>
</code></pre>
<p>For the decoding and execution of changes, the codec needs a lookup function
that allows it to resolve cell IDs as follows:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">lookup</span><span class="hl-1">(</span><span class="hl-0">id</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">getCell</span><span class="hl-1">(</span><span class="hl-0">id</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
</code></pre>
<p>For each encoded change (represented by a node), the following code can be
used to carry out the decoding and create a change object.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">changes</span><span class="hl-1"> = [];</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">change</span><span class="hl-1"> = </span><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">decode</span><span class="hl-1">(</span><span class="hl-0">node</span><span class="hl-1">);</span><br/><span class="hl-0">change</span><span class="hl-1">.</span><span class="hl-0">model</span><span class="hl-1"> = </span><span class="hl-0">model</span><span class="hl-1">;</span><br/><span class="hl-0">change</span><span class="hl-1">.</span><span class="hl-2">execute</span><span class="hl-1">();</span><br/><span class="hl-0">changes</span><span class="hl-1">.</span><span class="hl-2">push</span><span class="hl-1">(</span><span class="hl-0">change</span><span class="hl-1">);</span>
</code></pre>
<p>The changes can then be dispatched using the model as follows.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">edit</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">mxUndoableEdit</span><span class="hl-1">(</span><span class="hl-0">model</span><span class="hl-1">, </span><span class="hl-3">false</span><span class="hl-1">);</span><br/><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-0">changes</span><span class="hl-1"> = </span><span class="hl-0">changes</span><span class="hl-1">;</span><br/><br/><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-2">notify</span><span class="hl-1">()</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-0">source</span><span class="hl-1">.</span><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-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">CHANGE</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">, </span><span class="hl-6">&#39;changes&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-0">changes</span><span class="hl-1">));</span><br/><span class="hl-1"> </span><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-0">source</span><span class="hl-1">.</span><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-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">NOTIFY</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">, </span><span class="hl-6">&#39;changes&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">.</span><span class="hl-0">changes</span><span class="hl-1">));</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-0">model</span><span class="hl-1">.</span><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-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">UNDO</span><span class="hl-1">, </span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">));</span><br/><span class="hl-0">model</span><span class="hl-1">.</span><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-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">CHANGE</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">, </span><span class="hl-0">edit</span><span class="hl-1">, </span><span class="hl-6">&#39;changes&#39;</span><span class="hl-1">, </span><span class="hl-0">changes</span><span class="hl-1">));</span>
</code></pre>
<p>Event: mxEvent.CHANGE</p>
<p>Fires when an undoable edit is dispatched. The <code>edit</code> property
contains the <a href="UndoableEdit.html">UndoableEdit</a>. The <code>changes</code> property contains
the array of atomic changes inside the undoable edit. The changes property
is <strong>deprecated</strong>, please use edit.changes instead.</p>
<a href="#example" id="example" style="color: inherit; text-decoration: none;">
<h3>Example</h3>
</a>
<p>For finding newly inserted cells, the following code can be used:</p>
<pre><code class="language-javascript"><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">addListener</span><span class="hl-1">(</span><span class="hl-0">mxEvent</span><span class="hl-1">.</span><span class="hl-7">CHANGE</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1">(</span><span class="hl-0">sender</span><span class="hl-1">, </span><span class="hl-0">evt</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">changes</span><span class="hl-1"> = </span><span class="hl-0">evt</span><span class="hl-1">.</span><span class="hl-2">getProperty</span><span class="hl-1">(</span><span class="hl-6">&#39;edit&#39;</span><span class="hl-1">).</span><span class="hl-0">changes</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-5">for</span><span class="hl-1"> (</span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">i</span><span class="hl-1"> = </span><span class="hl-8">0</span><span class="hl-1">; </span><span class="hl-0">i</span><span class="hl-1"> &lt; </span><span class="hl-0">changes</span><span class="hl-1">.</span><span class="hl-0">length</span><span class="hl-1">; </span><span class="hl-0">i</span><span class="hl-1">++)</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">change</span><span class="hl-1"> = </span><span class="hl-0">changes</span><span class="hl-1">[</span><span class="hl-0">i</span><span class="hl-1">];</span><br/><br/><span class="hl-1"> </span><span class="hl-5">if</span><span class="hl-1"> (</span><span class="hl-0">change</span><span class="hl-1"> </span><span class="hl-3">instanceof</span><span class="hl-1"> </span><span class="hl-10">mxChildChange</span><span class="hl-1"> &amp;&amp;</span><br/><span class="hl-1"> </span><span class="hl-0">change</span><span class="hl-1">.</span><span class="hl-0">change</span><span class="hl-1">.</span><span class="hl-0">previous</span><span class="hl-1"> == </span><span class="hl-3">null</span><span class="hl-1">)</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">startEditingAtCell</span><span class="hl-1">(</span><span class="hl-0">change</span><span class="hl-1">.</span><span class="hl-0">child</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">break</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
</code></pre>
<p>Event: mxEvent.NOTIFY</p>
<p>Same as {@link Event#CHANGE}, this event can be used for classes that need to
implement a sync mechanism between this model and, say, a remote model. In
such a setup, only local changes should trigger a notify event and all
changes should trigger a change event.</p>
<p>Event: mxEvent.EXECUTE</p>
<p>Fires between begin- and endUpdate and after an atomic change was executed
in the model. The <code>change</code> property contains the atomic change
that was executed.</p>
<p>Event: mxEvent.EXECUTED</p>
<p>Fires between START_EDIT and END_EDIT after an atomic change was executed.
The <code>change</code> property contains the change that was executed.</p>
<p>Event: mxEvent.BEGIN_UPDATE</p>
<p>Fires after the <a href="GraphDataModel.html#updateLevel">updateLevel</a> was incremented in <a href="GraphDataModel.html#beginUpdate">beginUpdate</a>. This event
contains no properties.</p>
<p>Event: mxEvent.START_EDIT</p>
<p>Fires after the <a href="GraphDataModel.html#updateLevel">updateLevel</a> was changed from 0 to 1. This event
contains no properties.</p>
<p>Event: mxEvent.END_UPDATE</p>
<p>Fires after the <a href="GraphDataModel.html#updateLevel">updateLevel</a> was decreased in <a href="GraphDataModel.html#endUpdate">endUpdate</a> but before any
notification or change dispatching. The <code>edit</code> property contains
the <a href="GraphDataModel.html#currentEdit">currentEdit</a>.</p>
<p>Event: mxEvent.END_EDIT</p>
<p>Fires after the <a href="GraphDataModel.html#updateLevel">updateLevel</a> was changed from 1 to 0. This event
contains no properties.</p>
<p>Event: mxEvent.BEFORE_UNDO</p>
<p>Fires before the change is dispatched after the update level has reached 0
in <a href="GraphDataModel.html#endUpdate">endUpdate</a>. The <code>edit</code> property contains the {@link curreneEdit}.</p>
<p>Event: mxEvent.UNDO</p>
<p>Fires after the change was dispatched in <a href="GraphDataModel.html#endUpdate">endUpdate</a>. The <code>edit</code>
property contains the <a href="GraphDataModel.html#currentEdit">currentEdit</a>.</p>
</div></div></section><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">GraphDataModel</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="GraphDataModel.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="GraphDataModel.html#cells" class="tsd-kind-icon">cells</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#createIds" class="tsd-kind-icon">create<wbr/>Ids</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#currentEdit" class="tsd-kind-icon">current<wbr/>Edit</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#endingUpdate" class="tsd-kind-icon">ending<wbr/>Update</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="GraphDataModel.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="GraphDataModel.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="GraphDataModel.html#eventsEnabled" class="tsd-kind-icon">events<wbr/>Enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#ignoreRelativeEdgeParent" class="tsd-kind-icon">ignore<wbr/>Relative<wbr/>Edge<wbr/>Parent</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#maintainEdgeParent" class="tsd-kind-icon">maintain<wbr/>Edge<wbr/>Parent</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#nextId" class="tsd-kind-icon">next<wbr/>Id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#postfix" class="tsd-kind-icon">postfix</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#prefix" class="tsd-kind-icon">prefix</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#root" class="tsd-kind-icon">root</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#updateLevel" class="tsd-kind-icon">update<wbr/>Level</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="GraphDataModel.html#add" class="tsd-kind-icon">add</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="GraphDataModel.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#beginUpdate" class="tsd-kind-icon">begin<wbr/>Update</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#cellAdded" class="tsd-kind-icon">cell<wbr/>Added</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#cellRemoved" class="tsd-kind-icon">cell<wbr/>Removed</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#clear" class="tsd-kind-icon">clear</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#cloneCell" class="tsd-kind-icon">clone<wbr/>Cell</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#collapsedStateForCellChanged" class="tsd-kind-icon">collapsed<wbr/>State<wbr/>For<wbr/>Cell<wbr/>Changed</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a hr
<p>Maps from Ids to cells.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="createIds" class="tsd-anchor"></a><h3>create<wbr/>Ids</h3><div class="tsd-signature tsd-kind-icon">create<wbr/>Ids<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/GraphDataModel.ts#L239">view/GraphDataModel.ts:239</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if the model should automatically create Ids for new cells.
Default is true.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="currentEdit" class="tsd-anchor"></a><h3>current<wbr/>Edit</h3><div class="tsd-signature tsd-kind-icon">current<wbr/>Edit<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</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/GraphDataModel.ts#L262">view/GraphDataModel.ts:262</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the changes for the current transaction. If the transaction is
closed then a new object is created for this variable using
<a href="GraphDataModel.html#createUndoableEdit">createUndoableEdit</a>.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="endingUpdate" class="tsd-anchor"></a><h3>ending<wbr/>Update</h3><div class="tsd-signature tsd-kind-icon">ending<wbr/>Update<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/GraphDataModel.ts#L275">view/GraphDataModel.ts:275</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>True if the program flow is currently inside endUpdate.</p>
</div></div></section><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="ignoreRelativeEdgeParent" class="tsd-anchor"></a><h3>ignore<wbr/>Relative<wbr/>Edge<wbr/>Parent</h3><div class="tsd-signature tsd-kind-icon">ignore<wbr/>Relative<wbr/>Edge<wbr/>Parent<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/GraphDataModel.ts#L233">view/GraphDataModel.ts:233</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if relative edge parents should be ignored for finding the nearest
common ancestors of an edge&#39;s terminals. Default is true.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="maintainEdgeParent" class="tsd-anchor"></a><h3>maintain<wbr/>Edge<wbr/>Parent</h3><div class="tsd-signature tsd-kind-icon">maintain<wbr/>Edge<wbr/>Parent<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/GraphDataModel.ts#L227">view/GraphDataModel.ts:227</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if edges should automatically be moved into the nearest common
ancestor of their terminals. Default is true.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="nextId" class="tsd-anchor"></a><h3>next<wbr/>Id</h3><div class="tsd-signature tsd-kind-icon">next<wbr/>Id<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/GraphDataModel.ts#L255">view/GraphDataModel.ts:255</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies the next Id to be created. Initial value is 0.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="postfix" class="tsd-anchor"></a><h3>postfix</h3><div class="tsd-signature tsd-kind-icon">postfix<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/GraphDataModel.ts#L249">view/GraphDataModel.ts:249</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Defines the postfix of new Ids. Default is an empty string.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="prefix" class="tsd-anchor"></a><h3>prefix</h3><div class="tsd-signature tsd-kind-icon">prefix<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/GraphDataModel.ts#L244">view/GraphDataModel.ts:244</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Defines the prefix of new Ids. Default is an empty string.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="root" class="tsd-anchor"></a><h3>root</h3><div class="tsd-signature tsd-kind-icon">root<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L216">view/GraphDataModel.ts:216</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the root cell, which in turn contains the cells that represent the
layers of the diagram as child cells. That is, the actual elements of the
diagram are supposed to live in the third generation of cells and below.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="updateLevel" class="tsd-anchor"></a><h3>update<wbr/>Level</h3><div class="tsd-signature tsd-kind-icon">update<wbr/>Level<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/GraphDataModel.ts#L270">view/GraphDataModel.ts:270</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Counter for the depth of nested transactions. Each call to <a href="GraphDataModel.html#beginUpdate">beginUpdate</a>
will increment this number and each call to <a href="GraphDataModel.html#endUpdate">endUpdate</a> will decrement
it. When the counter reaches 0, the transaction is closed and the
respective events are fired. Initial value is 0.</p>
</div></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"><a id="add" class="tsd-anchor"></a><h3>add</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>parent<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, child<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, index<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><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">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L414">view/GraphDataModel.ts:414</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds the specified child to the parent at the given index using
<a href="ChildChange.html">ChildChange</a> and adds the change to the current transaction. If no
index is specified then the child is appended to the parent&#39;s array of
children. Returns the inserted child.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>parent: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the parent to contain the child.</p>
</div></div></li><li><h5>child: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the child to be inserted.</p>
</div></div></li><li><h5>index: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional integer that specifies the index of the child.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><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="beginUpdate" class="tsd-anchor"></a><h3>begin<wbr/>Update</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">begin<wbr/>Update<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/GraphDataModel.ts#L984">view/GraphDataModel.ts:984</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Increments the <a href="GraphDataModel.html#updateLevel">updateLevel</a> by one. The event notification
is queued until <a href="GraphDataModel.html#updateLevel">updateLevel</a> reaches 0 by use of
<a href="GraphDataModel.html#endUpdate">endUpdate</a>.</p>
</div><div><p>All changes on <a href="GraphDataModel.html">GraphDataModel</a> are transactional,
that is, they are executed in a single undoable change
on the model (without transaction isolation).
Therefore, if you want to combine any
number of changes into a single undoable change,
you should group any two or more API calls that
modify the graph model between <a href="GraphDataModel.html#beginUpdate">beginUpdate</a>
and <a href="GraphDataModel.html#endUpdate">endUpdate</a> calls as shown here:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1"> = </span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDataModel</span><span class="hl-1">();</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">parent</span><span class="hl-1"> = </span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDefaultParent</span><span class="hl-1">();</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">index</span><span class="hl-1"> = </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">getChildCount</span><span class="hl-1">(</span><span class="hl-0">parent</span><span class="hl-1">);</span><br/><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">beginUpdate</span><span class="hl-1">();</span><br/><span class="hl-5">try</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">add</span><span class="hl-1">(</span><span class="hl-0">parent</span><span class="hl-1">, </span><span class="hl-0">v1</span><span class="hl-1">, </span><span class="hl-0">index</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">add</span><span class="hl-1">(</span><span class="hl-0">parent</span><span class="hl-1">, </span><span class="hl-0">v2</span><span class="hl-1">, </span><span class="hl-0">index</span><span class="hl-1">+</span><span class="hl-8">1</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-5">finally</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">endUpdate</span><span class="hl-1">();</span><br/><span class="hl-1">}</span>
</code></pre>
<p>Of course there is a shortcut for appending a
sequence of cells into the default parent:</p>
<pre><code class="language-javascript"><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">addCells</span><span class="hl-1">([</span><span class="hl-0">v1</span><span class="hl-1">, </span><span class="hl-0">v2</span><span class="hl-1">]).</span>
</code></pre>
</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="cellAdded" class="tsd-anchor"></a><h3>cell<wbr/>Added</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">cell<wbr/>Added<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L451">view/GraphDataModel.ts:451</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update <a href="GraphDataModel.html#cells">cells</a> when a cell has been added. This
implementation resolves collisions by creating new Ids. To change the
ID of a cell after it was inserted into the model, use the following
code:</p>
</div><div><p>(code
delete model.cells[cell.getId()];
cell.setId(newId);
model.cells[cell.getId()] = cell;</p>
<pre><code><br/><span class="hl-0">If</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-0">change</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-7">ID</span><span class="hl-1"> </span><span class="hl-0">should</span><span class="hl-1"> </span><span class="hl-0">be</span><span class="hl-1"> </span><span class="hl-0">part</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-0">command</span><span class="hl-1"> </span><span class="hl-0">history</span><span class="hl-1">, </span><span class="hl-0">then</span><span class="hl-1"> </span><span class="hl-0">the</span><br/><span class="hl-0">cell</span><span class="hl-1"> </span><span class="hl-0">should</span><span class="hl-1"> </span><span class="hl-0">be</span><span class="hl-1"> </span><span class="hl-0">removed</span><span class="hl-1"> </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1"> </span><span class="hl-0">and</span><span class="hl-1"> </span><span class="hl-0">a</span><span class="hl-1"> </span><span class="hl-0">clone</span><span class="hl-1"> </span><span class="hl-5">with</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-7">ID</span><span class="hl-1"> </span><span class="hl-0">should</span><br/><span class="hl-0">be</span><span class="hl-1"> </span><span class="hl-0">reinserted</span><span class="hl-1"> </span><span class="hl-0">into</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1"> </span><span class="hl-0">instead</span><span class="hl-1">.</span><br/><br/><span class="hl-1">@</span><span class="hl-0">param</span><span class="hl-1"> {</span><span class="hl-0">Cell</span><span class="hl-1">} </span><span class="hl-0">cell</span><span class="hl-1"> </span><span class="hl-0">that</span><span class="hl-1"> </span><span class="hl-0">specifies</span><span class="hl-1"> </span><span class="hl-0">the</span><span class="hl-1"> </span><span class="hl-0">cell</span><span class="hl-1"> </span><span class="hl-0">that</span><span class="hl-1"> </span><span class="hl-0">has</span><span class="hl-1"> </span><span class="hl-0">been</span><span class="hl-1"> </span><span class="hl-0">added</span><span class="hl-1">.</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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="cellRemoved" class="tsd-anchor"></a><h3>cell<wbr/>Removed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">cell<wbr/>Removed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L623">view/GraphDataModel.ts:623</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update <a href="GraphDataModel.html#cells">cells</a> when a cell has been removed.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the cell that has been removed.</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"><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/GraphDataModel.ts#L292">view/GraphDataModel.ts:292</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets a new root using <a href="GraphDataModel.html#createRoot">createRoot</a>.</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="cloneCell" class="tsd-anchor"></a><h3>clone<wbr/>Cell</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">clone<wbr/>Cell<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, includeChildren<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">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L1152">view/GraphDataModel.ts:1152</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a deep clone of the given <a href="Cell.html">Cell</a><code> (including the children) which is created using &lt;a href=&quot;Graph.html#cloneCells&quot;&gt;cloneCells&lt;/a&gt;</code>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>to be cloned.</p>
</div></div></li><li><h5>includeChildren: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collapsedStateForCellChanged" class="tsd-anchor"></a><h3>collapsed<wbr/>State<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">collapsed<wbr/>State<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, collapsed<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">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/GraphDataModel.ts#L892">view/GraphDataModel.ts:892</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the collapsed state of the
given <a href="Cell.html">Cell</a> using {@link Cell#setCollapsed} and return
the previous collapsed state.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the cell to be updated.</p>
</div></div></li><li><h5>collapsed: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean that specifies the new collpased state.</p>
</div></div></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="contains" class="tsd-anchor"></a><h3>contains</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">contains<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L400">view/GraphDataModel.ts:400</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if the model contains the given <a href="Cell.html">Cell</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the cell.</p>
</div></div></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="createId" class="tsd-anchor"></a><h3>create<wbr/>Id</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">create<wbr/>Id<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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/GraphDataModel.ts#L498">view/GraphDataModel.ts:498</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Hook method to create an Id for the specified cell. This implementation
concatenates <a href="GraphDataModel.html#prefix">prefix</a>, id and <a href="GraphDataModel.html#postfix">postfix</a> to create the Id and increments
<a href="GraphDataModel.html#nextId">nextId</a>. The cell is ignored by this implementation, but can be used in
overridden methods to prefix the Ids with eg. the cell type.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>to create the Id for.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="createRoot" class="tsd-anchor"></a><h3>create<wbr/>Root</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">create<wbr/>Root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L313">view/GraphDataModel.ts:313</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates a new root cell with a default layer (child 0).</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="createUndoableEdit" class="tsd-anchor"></a><h3>create<wbr/>Undoable<wbr/>Edit</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">create<wbr/>Undoable<wbr/>Edit<span class="tsd-signature-symbol">(</span>significant<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><a href="UndoableEdit.html" class="tsd-signature-type" data-tsd-kind="Class">UndoableEdit</a></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/GraphDataModel.ts#L1040">view/GraphDataModel.ts:1040</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates a new <a href="UndoableEdit.html">UndoableEdit</a> that implements the
notify function to fire a {@link change} and <a href="UndoableEdit.html#notify">notify</a> event
through the <a href="UndoableEdit.html">UndoableEdit</a>&#39;s source.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>significant: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional boolean that specifies if the edit to be created is
significant. Default is true.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="UndoableEdit.html" class="tsd-signature-type" data-tsd-kind="Class">UndoableEdit</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="endUpdate" class="tsd-anchor"></a><h3>end<wbr/>Update</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">end<wbr/>Update<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/GraphDataModel.ts#L1005">view/GraphDataModel.ts:1005</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Decrements the <a href="GraphDataModel.html#updateLevel">updateLevel</a> by one and fires an <a href="Editor.html#undo">undo</a>
event if the <a href="GraphDataModel.html#updateLevel">updateLevel</a> reaches 0. This function
indirectly fires a {@link change} event by invoking the notify
function on the <a href="GraphDataModel.html#currentEdit">currentEdit</a> und then creates a new
<a href="GraphDataModel.html#currentEdit">currentEdit</a> using <a href="GraphDataModel.html#createUndoableEdit">createUndoableEdit</a>.</p>
</div><div><p>The <a href="Editor.html#undo">undo</a> event is fired only once per edit, whereas
the {@link change} event is fired whenever the notify
function is invoked, that is, on undo and redo of
the edit.</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="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>change<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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/GraphDataModel.ts#L937">view/GraphDataModel.ts:937</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Executes the given edit and fires events if required. The edit object
requires an execute function which is invoked. The edit is added to the
<a href="GraphDataModel.html#currentEdit">currentEdit</a> between <a href="GraphDataModel.html#beginUpdate">beginUpdate</a> and <a href="GraphDataModel.html#endUpdate">endUpdate</a> calls, so that
events will be fired if this execute is an individual transaction, that
is, if no previous <a href="GraphDataModel.html#beginUpdate">beginUpdate</a> calls have been made without calling
<a href="GraphDataModel.html#endUpdate">endUpdate</a>. This implementation fires an <a href="GraphDataModel.html#execute">execute</a> event before
executing the given change.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>change: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object that described the change.</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"><a id="filterCells" class="tsd-anchor"></a><h3>filter<wbr/>Cells</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">filter<wbr/>Cells<span class="tsd-signature-symbol">(</span>cells<span class="tsd-signature-symbol">: </span><a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a>, filter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FilterFunction</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a></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/GraphDataModel.ts#L329">view/GraphDataModel.ts:329</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cells: <a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a></h5></li><li><h5>filter: <span class="tsd-signature-type">FilterFunction</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a></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"><a id="geometryForCellChanged" class="tsd-anchor"></a><h3>geometry<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">geometry<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, geometry<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</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><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></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/GraphDataModel.ts#L836">view/GraphDataModel.ts:836</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the <a href="Geometry.html">Geometry</a> of the given <a href="Cell.html">Cell</a> using
{@link Cell#setGeometry} and return the previous <a href="Geometry.html">Geometry</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>geometry: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCell" class="tsd-anchor"></a><h3>get<wbr/>Cell</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Cell<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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/GraphDataModel.ts#L325">view/GraphDataModel.ts:325</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the <a href="Cell.html">Cell</a> for the specified Id or null if no cell can be
found for the given Id.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>id: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A string representing the Id of the cell.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getEdgesBetween" class="tsd-anchor"></a><h3>get<wbr/>Edges<wbr/>Between</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Edges<wbr/>Between<span class="tsd-signature-symbol">(</span>source<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, target<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, directed<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><a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a></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/GraphDataModel.ts#L750">view/GraphDataModel.ts:750</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns all edges between the given source and target pair. If directed
is true, then only edges from the source to the target are returned,
otherwise, all edges between the two cells are returned.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>source: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that defines the source terminal of the edge to be
returned.</p>
</div></div></li><li><h5>target: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that defines the target terminal of the edge to be
returned.</p>
</div></div></li><li><h5>directed: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional boolean that specifies if the direction of the
edge should be taken into account. Default is false.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="CellArray.html" class="tsd-signature-type" data-tsd-kind="Class">CellArray</a></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="getRoot" class="tsd-anchor"></a><h3>get<wbr/>Root</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Root<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L333">view/GraphDataModel.ts:333</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol"> = null</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isCreateIds" class="tsd-anchor"></a><h3>is<wbr/>Create<wbr/>Ids</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Create<wbr/>Ids<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/GraphDataModel.ts#L299">view/GraphDataModel.ts:299</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns <a href="GraphDataModel.html#createIds">createIds</a>.</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="isLayer" class="tsd-anchor"></a><h3>is<wbr/>Layer</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Layer<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L391">view/GraphDataModel.ts:391</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if <a href="GraphDataModel.html#isRoot">isRoot</a> returns true for the parent of the given cell.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that represents the possible layer.</p>
</div></div></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="isRoot" class="tsd-anchor"></a><h3>is<wbr/>Root</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Root<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L382">view/GraphDataModel.ts:382</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if the given cell is the root of the model and a non-null
value.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that represents the possible root.</p>
</div></div></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="mergeChildren" class="tsd-anchor"></a><h3>merge<wbr/>Children</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">merge<wbr/>Children<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, to<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, cloneAllEdges<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/GraphDataModel.ts#L1063">view/GraphDataModel.ts:1063</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Merges the children of the given cell into the given target cell inside
this model. All cells are cloned unless there is a corresponding cell in
the model with the same id, in which case the source cell is ignored and
all edges are connected to the corresponding cell in this model. Edges
are considered to have no identity and are always cloned unless the
cloneAllEdges flag is set to false, in which case edges with the same
id in the target model are reconnected to reflect the terminals of the
source edges.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>from: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>to: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>cloneAllEdges: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</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="mergeChildrenImpl" class="tsd-anchor"></a><h3>merge<wbr/>Children<wbr/>Impl</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">merge<wbr/>Children<wbr/>Impl<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, to<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, cloneAllEdges<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, mapping<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</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/GraphDataModel.ts#L1100">view/GraphDataModel.ts:1100</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Clones the children of the source cell into the given target cell in
this model and adds an entry to the mapping that maps from the source
cell to the target cell with the same id or the clone of the source cell
that was inserted into this model.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>from: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>to: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>cloneAllEdges: <span class="tsd-signature-type">boolean</span></h5></li><li><h5>mapping: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</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="parentForCellChanged" class="tsd-anchor"></a><h3>parent<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">parent<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, parent<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, index<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="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L649">view/GraphDataModel.ts:649</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the parent of a cell using {@link Cell#insert}
on the parent and return the previous parent.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>to update the parent for.</p>
</div></div></li><li><h5>parent: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new parent of the cell.</p>
</div></div></li><li><h5>index: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional integer that defines the index of the child
in the parent&#39;s child array.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="remove" class="tsd-anchor"></a><h3>remove</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">remove<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L609">view/GraphDataModel.ts:609</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Removes the specified cell from the model using <a href="ChildChange.html">ChildChange</a> and adds
the change to the current transaction. This operation will remove the
cell and all of its children from the model. Returns the removed cell.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that should be removed.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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"><a id="rootChanged" class="tsd-anchor"></a><h3>root<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">root<wbr/>Changed<span class="tsd-signature-symbol">(</span>root<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L364">view/GraphDataModel.ts:364</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to change the root of the model and update the internal
datastructures, such as <a href="GraphDataModel.html#cells">cells</a> and <a href="GraphDataModel.html#nextId">nextId</a>. Returns the previous root.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>root: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new root.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setCollapsed" class="tsd-anchor"></a><h3>set<wbr/>Collapsed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Collapsed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, collapsed<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">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/GraphDataModel.ts#L877">view/GraphDataModel.ts:877</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the collapsed state of the given <a href="Cell.html">Cell</a> using <a href="CollapseChange.html">CollapseChange</a>
and adds the change to the current transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>whose collapsed state should be changed.</p>
</div></div></li><li><h5>collapsed: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean that specifies the new collpased state.</p>
</div></div></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="setCreateIds" class="tsd-anchor"></a><h3>set<wbr/>Create<wbr/>Ids</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Create<wbr/>Ids<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"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/GraphDataModel.ts#L306">view/GraphDataModel.ts:306</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets <a href="GraphDataModel.html#createIds">createIds</a>.</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 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="setGeometry" class="tsd-anchor"></a><h3>set<wbr/>Geometry</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Geometry<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, geometry<span class="tsd-signature-symbol">: </span><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></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/GraphDataModel.ts#L825">view/GraphDataModel.ts:825</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the <a href="Geometry.html">Geometry</a> of the given <a href="Cell.html">Cell</a>. The actual update
of the cell is carried out in <a href="GraphDataModel.html#geometryForCellChanged">geometryForCellChanged</a>. The
<a href="GeometryChange.html">GeometryChange</a> action is used to encapsulate the change.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>whose geometry should be changed.</p>
</div></div></li><li><h5>geometry: <a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that defines the new geometry.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="Geometry.html" class="tsd-signature-type" data-tsd-kind="Class">Geometry</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setRoot" class="tsd-anchor"></a><h3>set<wbr/>Root</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Root<span class="tsd-signature-symbol">(</span>root<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L353">view/GraphDataModel.ts:353</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the <a href="GraphDataModel.html#root">root</a> of the model using <a href="RootChange.html">RootChange</a> and adds the change to
the current transaction. This resets all datastructures in the model and
is the preferred way of clearing an existing model. Returns the new
root.</p>
</div><div><p>Example:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">root</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">mxCell</span><span class="hl-1">();</span><br/><span class="hl-0">root</span><span class="hl-1">.</span><span class="hl-2">insert</span><span class="hl-1">(</span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">mxCell</span><span class="hl-1">());</span><br/><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">setRoot</span><span class="hl-1">(</span><span class="hl-0">root</span><span class="hl-1">);</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>root: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new root.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setStyle" class="tsd-anchor"></a><h3>set<wbr/>Style</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Style<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, style<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</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/GraphDataModel.ts#L850">view/GraphDataModel.ts:850</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the style of the given <a href="Cell.html">Cell</a> using <a href="StyleChange.html">StyleChange</a> and
adds the change to the current transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>whose style should be changed.</p>
</div></div></li><li><h5>style: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>String of the form [stylename;|key=value;] to specify
the new cell style.</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"><a id="setTerminal" class="tsd-anchor"></a><h3>set<wbr/>Terminal</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Terminal<span class="tsd-signature-symbol">(</span>edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, terminal<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, isSource<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">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L685">view/GraphDataModel.ts:685</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the source or target terminal of the given <a href="Cell.html">Cell</a> using
<a href="TerminalChange.html">TerminalChange</a> and adds the change to the current transaction.
This implementation updates the parent of the edge using <a href="GraphDataModel.html#updateEdgeParent">updateEdgeParent</a>
if required.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the edge.</p>
</div></div></li><li><h5>terminal: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new terminal.</p>
</div></div></li><li><h5>isSource: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean indicating if the terminal is the new source or
target terminal of the edge.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setTerminals" class="tsd-anchor"></a><h3>set<wbr/>Terminals</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Terminals<span class="tsd-signature-symbol">(</span>edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, source<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L704">view/GraphDataModel.ts:704</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the source and target <a href="Cell.html">Cell</a> of the given <a href="Cell.html">Cell</a> in a single
transaction using <a href="GraphDataModel.html#setTerminal">setTerminal</a> for each end of the edge.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the edge.</p>
</div></div></li><li><h5>source: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new source terminal.</p>
</div></div></li><li><h5>target: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new target terminal.</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"><a id="setValue" class="tsd-anchor"></a><h3>set<wbr/>Value</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Value<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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/GraphDataModel.ts#L790">view/GraphDataModel.ts:790</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the user object of then given <a href="Cell.html">Cell</a> using <a href="ValueChange.html">ValueChange</a>
and adds the change to the current transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>whose user object should be changed.</p>
</div></div></li><li><h5>value: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object that defines the new user object.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setVisible" class="tsd-anchor"></a><h3>set<wbr/>Visible</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Visible<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, visible<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">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/GraphDataModel.ts#L905">view/GraphDataModel.ts:905</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the visible state of the given <a href="Cell.html">Cell</a> using <a href="VisibleChange.html">VisibleChange</a> and
adds the change to the current transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>whose visible state should be changed.</p>
</div></div></li><li><h5>visible: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean that specifies the new visible state.</p>
</div></div></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="styleForCellChanged" class="tsd-anchor"></a><h3>style<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">style<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, style<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</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">string</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/GraphDataModel.ts#L864">view/GraphDataModel.ts:864</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the style of the given <a href="Cell.html">Cell</a>
using {@link Cell#setStyle} and return the previous style.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the cell to be updated.</p>
</div></div></li><li><h5>style: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>String of the form [stylename;|key=value;] to specify
the new cell style.</p>
</div></div></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">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="terminalForCellChanged" class="tsd-anchor"></a><h3>terminal<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">terminal<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, terminal<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, isSource<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">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></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/GraphDataModel.ts#L724">view/GraphDataModel.ts:724</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner helper function to update the terminal of the edge using
{@link Cell#insertEdge} and return the previous terminal.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the edge to be updated.</p>
</div></div></li><li><h5>terminal: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the new terminal.</p>
</div></div></li><li><h5>isSource: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean indicating if the terminal is the new source or
target terminal of the edge.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="updateEdgeParent" class="tsd-anchor"></a><h3>update<wbr/>Edge<wbr/>Parent</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<wbr/>Edge<wbr/>Parent<span class="tsd-signature-symbol">(</span>edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, root<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L544">view/GraphDataModel.ts:544</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the parent of the specified <a href="Cell.html">Cell</a> to the
nearest-common-ancestor of its two terminals.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the edge.</p>
</div></div></li><li><h5>root: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that represents the current root of the model.</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"><a id="updateEdgeParents" class="tsd-anchor"></a><h3>update<wbr/>Edge<wbr/>Parents</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<wbr/>Edge<wbr/>Parents<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, root<span class="tsd-signature-symbol">?: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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/GraphDataModel.ts#L508">view/GraphDataModel.ts:508</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Updates the parent for all edges that are connected to cell or one of
its descendants using <a href="GraphDataModel.html#updateEdgeParent">updateEdgeParent</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>root: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol"> = ...</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="valueForCellChanged" class="tsd-anchor"></a><h3>value<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">value<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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/GraphDataModel.ts#L813">view/GraphDataModel.ts:813</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the user object of the given <a href="Cell.html">Cell</a>
using {@link Cell#valueChanged} and return the previous value,
that is, the return value of {@link Cell#valueChanged}.</p>
</div><div><p>To change a specific attribute in an XML node, the following code can be
used.</p>
<pre><code class="language-javascript"><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDataModel</span><span class="hl-1">().</span><span class="hl-2">valueForCellChanged</span><span class="hl-1">(</span><span class="hl-0">cell</span><span class="hl-1">, </span><span class="hl-0">value</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">previous</span><span class="hl-1"> = </span><span class="hl-0">cell</span><span class="hl-1">.</span><span class="hl-0">value</span><span class="hl-1">.</span><span class="hl-2">getAttribute</span><span class="hl-1">(</span><span class="hl-6">&#39;label&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">cell</span><span class="hl-1">.</span><span class="hl-0">value</span><span class="hl-1">.</span><span class="hl-2">setAttribute</span><span class="hl-1">(</span><span class="hl-6">&#39;label&#39;</span><span class="hl-1">, </span><span class="hl-0">value</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">previous</span><span class="hl-1">;</span><br/><span class="hl-1">};</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>value: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="visibleStateForCellChanged" class="tsd-anchor"></a><h3>visible<wbr/>State<wbr/>For<wbr/>Cell<wbr/>Changed</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">visible<wbr/>State<wbr/>For<wbr/>Cell<wbr/>Changed<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, visible<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">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/GraphDataModel.ts#L920">view/GraphDataModel.ts:920</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inner callback to update the visible state of the
given <a href="Cell.html">Cell</a> using {@link Cell#setCollapsed} and return
the previous visible state.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>that specifies the cell to be updated.</p>
</div></div></li><li><h5>visible: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean that specifies the new visible state.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</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="GraphDataModel.html" class="tsd-kind-icon">Graph<wbr/>Data<wbr/>Model</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="GraphDataModel.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#cells" class="tsd-kind-icon">cells</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#createIds" class="tsd-kind-icon">create<wbr/>Ids</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#currentEdit" class="tsd-kind-icon">current<wbr/>Edit</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#endingUpdate" class="tsd-kind-icon">ending<wbr/>Update</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="GraphDataModel.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="GraphDataModel.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="GraphDataModel.html#eventsEnabled" class="tsd-kind-icon">events<wbr/>Enabled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#ignoreRelativeEdgeParent" class="tsd-kind-icon">ignore<wbr/>Relative<wbr/>Edge<wbr/>Parent</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#maintainEdgeParent" class="tsd-kind-icon">maintain<wbr/>Edge<wbr/>Parent</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#nextId" class="tsd-kind-icon">next<wbr/>Id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#postfix" class="tsd-kind-icon">postfix</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#prefix" class="tsd-kind-icon">prefix</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#root" class="tsd-kind-icon">root</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GraphDataModel.html#updateLevel" class="tsd-kind-icon">update<wbr/>Level</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#add" class="tsd-kind-icon">add</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="GraphDataModel.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GraphDataModel.html#beginUpdate" class="tsd-kind-icon">begin<wbr/>Update</a></li><li