398 lines
250 KiB
HTML
398 lines
250 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||
|
|
||
|
<html><head><title>mxGraphModel</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
|
||
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
||
|
|
||
|
<!-- Generated by Natural Docs, version 1.5 -->
|
||
|
<!-- http://www.naturaldocs.org -->
|
||
|
|
||
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxGraphModel"></a>mxGraphModel</h1><div class=CBody><p>Extends <a href="../util/mxEventSource-js.html#mxEventSource" class=LClass id=link193 onMouseOver="ShowTip(event, 'tt1', 'link193')" onMouseOut="HideTip('tt1')">mxEventSource</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><h4 class=CHeading>Layers</h4><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="#mxGraphModel.isLayer" class=LFunction id=link194 onMouseOver="ShowTip(event, 'tt30', 'link194')" onMouseOut="HideTip('tt30')">isLayer</a> function is used. It returns true if the parent of the given cell is the root of the model.</p><h4 class=CHeading>Encoding the model</h4><h4 class=CHeading>To encode a graph model, use the following code</h4><blockquote><pre class="prettyprint">var enc = new mxCodec();
|
||
|
var node = enc.encode(graph.getModel());</pre></blockquote><p>This will create an XML node that contains all the model information.</p><h4 class=CHeading>Encoding and decoding changes</h4><p>For the encoding of changes, a graph model listener is required that encodes each change from the given array of changes.</p><blockquote><pre class="prettyprint">model.addListener(mxEvent.CHANGE, function(sender, evt)
|
||
|
{
|
||
|
var changes = evt.getProperty('edit').changes;
|
||
|
var nodes = [];
|
||
|
var codec = new mxCodec();
|
||
|
|
||
|
for (var i = 0; i < changes.length; i++)
|
||
|
{
|
||
|
nodes.push(codec.encode(changes[i]));
|
||
|
}
|
||
|
// do something with the nodes
|
||
|
});</pre></blockquote><p>For the decoding and execution of changes, the codec needs a lookup function that allows it to resolve cell IDs as follows:</p><blockquote><pre class="prettyprint">var codec = new mxCodec();
|
||
|
codec.lookup = function(id)
|
||
|
{
|
||
|
return model.getCell(id);
|
||
|
}</pre></blockquote><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><blockquote><pre class="prettyprint">var changes = [];
|
||
|
var change = codec.decode(node);
|
||
|
change.model = model;
|
||
|
change.execute();
|
||
|
changes.push(change);</pre></blockquote><p>The changes can then be dispatched using the model as follows.</p><blockquote><pre class="prettyprint">var edit = new mxUndoableEdit(model, false);
|
||
|
edit.changes = changes;
|
||
|
|
||
|
edit.notify = function()
|
||
|
{
|
||
|
edit.source.fireEvent(new mxEventObject(mxEvent.CHANGE,
|
||
|
'edit', edit, 'changes', edit.changes));
|
||
|
edit.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,
|
||
|
'edit', edit, 'changes', edit.changes));
|
||
|
}
|
||
|
|
||
|
model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));
|
||
|
model.fireEvent(new mxEventObject(mxEvent.CHANGE,
|
||
|
'edit', edit, 'changes', changes));</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxGraphModel" >mxGraphModel</a></td><td class=SDescription>Extends <a href="../util/mxEventSource-js.html#mxEventSource" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxEventSource</a> to implement a graph model. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxGraphModel.Events" >Events</a></td><td class=SDescription></td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.mxEvent.CHANGE" >mxEvent.<wbr>CHANGE</a></td><td class=SDescription>Fires when an undoable edit is dispatched. </td></tr><tr class="SEvent SIndent2"><td class=SEntry><a href="#mxGraphModel.mxEvent.NOTIFY" >mxEvent.<wbr>NOTIFY</a></td><td class=SDescription>Same as <a href="#mxGraphModel.mxEvent.CHANGE" class=LEvent id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">mxEvent.CHANGE</a>, this event can be used for classes that need to implement a sync mechanism between this model and, say, a remote model. </td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.mxEvent.EXECUTE" >mxEvent.<wbr>EXECUTE</a></td><td class=SDescription>Fires between begin- and endUpdate and after an atomic change was executed in the model. </td></tr><tr class="SEvent SIndent2"><td class=SEntry><a href="#mxGraphModel.mxEvent.BEGIN_UPDATE" >mxEvent.<wbr>BEGIN_UPDATE</a></td><td class=SDescription>Fires after the <a href="#mxGraphModel.updateLevel" class=LVariable id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">updateLevel</a> was incremented in <a href="#mxGraphModel.beginUpdate" class=LFunction id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">beginUpdate</a>. </td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.mxEvent.END_UPDATE" >mxEvent.<wbr>END_UPDATE</a></td><td class=SDescription>Fires after the <a href="#mxGraphModel.updateLevel" class=LVariable id=link5 onMouseOver="ShowTip(event, 'tt3', 'link5')" onMouseOut="HideTip('tt3')">updateLevel</a> was decreased in <a href="#mxGraphModel.endUpdate" class=LFunction id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">endUpdate</a> but before any notification or change dispatching. </td></tr><tr class="SEvent SIndent2"><td class=SEntry><a href="#mxGraphModel.mxEvent.BEFORE_UNDO" >mxEvent.<wbr>BEFORE_UNDO</a></td><td class=SDescription>Fires before the change is dispatched after the update level has reached 0 in <a href="#mxGraphModel.endUpdate" class=LFunction id=link7 onMouseOver="ShowTip(event, 'tt5', 'link7')" onMouseOut="HideTip('tt5')">endUpdate</a>. </td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.mxEvent.UNDO" >mxEvent.UNDO</a></td><td class=SDescription>Fires after the change was dispatched in <a href="#mxGraphModel.endUpdate" class=LFunction id=link8 onMouseOver="ShowTip(event, 'tt5', 'link8')" onMouseOut="HideTip('tt5')">endUpdate</a>. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxGraphModel.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.mxGraphModel" id=link9 onMouseOver="ShowTip(event, 'tt6', 'link9')" onMouseOut="HideTip('tt6')">mxGraphModel</a></td><td class=SDescription>Constructs a new graph model. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxGraphModel.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxGraphModel.root" id=link10 onMouseOver="ShowTip(event, 'tt7', 'link10')" onMouseOut="HideTip('tt7')">root</a></td><td class=SDescription>Holds the root cell, which in turn contains the cells that represent the layers of the diagram as c
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.Events"></a>Events</h3></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.CHANGE"></a>mxEvent.<wbr>CHANGE</h3><div class=CBody><p>Fires when an undoable edit is dispatched. The <code>edit</code> property contains the <a href="../util/mxUndoableEdit-js.html#mxUndoableEdit" class=LClass id=link195 onMouseOver="ShowTip(event, 'tt99', 'link195')" onMouseOut="HideTip('tt99')">mxUndoableEdit</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><h4 class=CHeading>Example</h4><h4 class=CHeading>For finding newly inserted cells, the following code can be used</h4><blockquote><pre class="prettyprint">graph.model.addListener(mxEvent.CHANGE, function(sender, evt)
|
||
|
{
|
||
|
var changes = evt.getProperty('edit').changes;
|
||
|
|
||
|
for (var i = 0; i < changes.length; i++)
|
||
|
{
|
||
|
var change = changes[i];
|
||
|
|
||
|
if (change instanceof mxChildChange &&
|
||
|
change.change.previous == null)
|
||
|
{
|
||
|
graph.startEditingAtCell(change.child);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
});</pre></blockquote></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.NOTIFY"></a>mxEvent.<wbr>NOTIFY</h3><div class=CBody><p>Same as <a href="#mxGraphModel.mxEvent.CHANGE" class=LEvent id=link196 onMouseOver="ShowTip(event, 'tt2', 'link196')" onMouseOut="HideTip('tt2')">mxEvent.CHANGE</a>, 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></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.EXECUTE"></a>mxEvent.<wbr>EXECUTE</h3><div class=CBody><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></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.BEGIN_UPDATE"></a>mxEvent.<wbr>BEGIN_UPDATE</h3><div class=CBody><p>Fires after the <a href="#mxGraphModel.updateLevel" class=LVariable id=link197 onMouseOver="ShowTip(event, 'tt3', 'link197')" onMouseOut="HideTip('tt3')">updateLevel</a> was incremented in <a href="#mxGraphModel.beginUpdate" class=LFunction id=link198 onMouseOver="ShowTip(event, 'tt4', 'link198')" onMouseOut="HideTip('tt4')">beginUpdate</a>. This event contains no properties.</p></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.END_UPDATE"></a>mxEvent.<wbr>END_UPDATE</h3><div class=CBody><p>Fires after the <a href="#mxGraphModel.updateLevel" class=LVariable id=link199 onMouseOver="ShowTip(event, 'tt3', 'link199')" onMouseOut="HideTip('tt3')">updateLevel</a> was decreased in <a href="#mxGraphModel.endUpdate" class=LFunction id=link200 onMouseOver="ShowTip(event, 'tt5', 'link200')" onMouseOut="HideTip('tt5')">endUpdate</a> but before any notification or change dispatching. The <code>edit</code> property contains the <a href="#mxGraphModel.currentEdit" class=LVariable id=link201 onMouseOver="ShowTip(event, 'tt14', 'link201')" onMouseOut="HideTip('tt14')">currentEdit</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.BEFORE_UNDO"></a>mxEvent.<wbr>BEFORE_UNDO</h3><div class=CBody><p>Fires before the change is dispatched after the update level has reached 0 in <a href="#mxGraphModel.endUpdate" class=LFunction id=link202 onMouseOver="ShowTip(event, 'tt5', 'link202')" onMouseOut="HideTip('tt5')">endUpdate</a>. The <code>edit</code> property contains the <curreneEdit>.</p></div></div></div>
|
||
|
|
||
|
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxEvent.UNDO"></a>mxEvent.UNDO</h3><div class=CBody><p>Fires after the change was dispatched in <a href="#mxGraphModel.endUpdate" class=LFunction id=link203 onMouseOver="ShowTip(event, 'tt5', 'link203')" onMouseOut="HideTip('tt5')">endUpdate</a>. The <code>edit</code> property contains the <a href="#mxGraphModel.currentEdit" class=LVariable id=link204 onMouseOver="ShowTip(event, 'tt14', 'link204')" onMouseOut="HideTip('tt14')">currentEdit</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mxGraphModel"></a>mxGraphModel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxGraphModel(</td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new graph model. If no root is specified then a new root <a href="mxCell-js.html#mxCell" class=LClass id=link205 onMouseOver="ShowTip(event, 'tt21', 'link205')" onMouseOut="HideTip('tt21')">mxCell</a> with a default layer is created.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>root</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link206 onMouseOver="ShowTip(event, 'tt21', 'link206')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the root cell.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.Variables"></a>Variables</h3></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.root"></a>root</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.root</td></tr></table></blockquote><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></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cells"></a>cells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.cells</td></tr></table></blockquote><p>Maps from Ids to cells.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.maintainEdgeParent"></a>maintainEdgeParent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.maintainEdgeParent</td></tr></table></blockquote><p>Specifies if edges should automatically be moved into the nearest common ancestor of their terminals. Default is true.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.createIds"></a>createIds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.createIds</td></tr></table></blockquote><p>Specifies if the model should automatically create Ids for new cells. Default is true.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.prefix"></a>prefix</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.prefix</td></tr></table></blockquote><p>Defines the prefix of new Ids. Default is an empty string.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.postfix"></a>postfix</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.postfix</td></tr></table></blockquote><p>Defines the postfix of new Ids. Default is an empty string.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.nextId"></a>nextId</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.nextId</td></tr></table></blockquote><p>Specifies the next Id to be created. Initial value is 0.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.currentEdit"></a>currentEdit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.currentEdit</td></tr></table></blockquote><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="#mxGraphModel.createUndoableEdit" class=LFunction id=link207 onMouseOver="ShowTip(event, 'tt98', 'link207')" onMouseOut="HideTip('tt98')">createUndoableEdit</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.updateLevel"></a>updateLevel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.updateLevel</td></tr></table></blockquote><p>Counter for the depth of nested transactions. Each call to <a href="#mxGraphModel.beginUpdate" class=LFunction id=link208 onMouseOver="ShowTip(event, 'tt4', 'link208')" onMouseOut="HideTip('tt4')">beginUpdate</a> will increment this number and each call to <a href="#mxGraphModel.endUpdate" class=LFunction id=link209 onMouseOver="ShowTip(event, 'tt5', 'link209')" onMouseOut="HideTip('tt5')">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></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.endingUpdate"></a>endingUpdate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.endingUpdate</td></tr></table></blockquote><p>True if the program flow is currently inside endUpdate.</p></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.clear"></a>clear</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.clear = function()</td></tr></table></blockquote><p>Sets a new root using <a href="#mxGraphModel.createRoot" class=LFunction id=link210 onMouseOver="ShowTip(event, 'tt17', 'link210')" onMouseOut="HideTip('tt17')">createRoot</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isCreateIds"></a>isCreateIds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.isCreateIds = function()</td></tr></table></blockquote><p>Returns <a href="#mxGraphModel.createIds" class=LVariable id=link211 onMouseOver="ShowTip(event, 'tt10', 'link211')" onMouseOut="HideTip('tt10')">createIds</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setCreateIds"></a>setCreateIds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setCreateIds = function(</td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <a href="#mxGraphModel.createIds" class=LVariable id=link212 onMouseOver="ShowTip(event, 'tt10', 'link212')" onMouseOut="HideTip('tt10')">createIds</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.createRoot"></a>createRoot</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.createRoot = function()</td></tr></table></blockquote><p>Creates a new root cell with a default layer (child 0).</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getCell"></a>getCell</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getCell = function(</td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <a href="mxCell-js.html#mxCell" class=LClass id=link213 onMouseOver="ShowTip(event, 'tt21', 'link213')" onMouseOut="HideTip('tt21')">mxCell</a> for the specified Id or null if no cell can be found for the given Id.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>id</td><td class=CDLDescription>A string representing the Id of the cell.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.filterCells"></a>filterCells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.filterCells = function(</td><td class=PParameter nowrap>cells,</td></tr><tr><td></td><td class=PParameter nowrap>filter</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the cells from the given array where the fiven filter function returns true.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getDescendants"></a>getDescendants</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getDescendants = function(</td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all descendants of the given cell and the cell itself in an array.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>parent</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link214 onMouseOver="ShowTip(event, 'tt21', 'link214')" onMouseOut="HideTip('tt21')">mxCell</a> whose descendants should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.filterDescendants"></a>filterDescendants</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.filterDescendants = function(</td><td class=PParameter nowrap>filter,</td></tr><tr><td></td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Visits all cells recursively and applies the specified filter function to each cell. If the function returns true then the cell is added to the resulting array. The parent and result paramters are optional. If parent is not specified then the recursion starts at <a href="#mxGraphModel.root" class=LVariable id=link215 onMouseOver="ShowTip(event, 'tt7', 'link215')" onMouseOut="HideTip('tt7')">root</a>.</p><h4 class=CHeading>Example</h4><p>The following example extracts all vertices from a given model:</p><blockquote><pre class="prettyprint">var filter = function(cell)
|
||
|
{
|
||
|
return model.isVertex(cell);
|
||
|
}
|
||
|
var vertices = model.filterDescendants(filter);
|
||
|
(code)
|
||
|
|
||
|
Parameters:
|
||
|
|
||
|
filter - JavaScript function that takes an <mxCell> as an argument
|
||
|
and returns a boolean.
|
||
|
parent - Optional <mxCell> that is used as the root of the recursion.</pre></blockquote></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getRoot"></a>getRoot</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getRoot = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the root of the model or the topmost parent of the given cell.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription>Optional <a href="mxCell-js.html#mxCell" class=LClass id=link216 onMouseOver="ShowTip(event, 'tt21', 'link216')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the child.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setRoot"></a>setRoot</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setRoot = function(</td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the <a href="#mxGraphModel.root" class=LVariable id=link217 onMouseOver="ShowTip(event, 'tt7', 'link217')" onMouseOut="HideTip('tt7')">root</a> of the model using <a href="#mxRootChange" class=LClass id=link218 onMouseOver="ShowTip(event, 'tt27', 'link218')" onMouseOut="HideTip('tt27')">mxRootChange</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><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">var root = new mxCell();
|
||
|
root.insert(new mxCell());
|
||
|
model.setRoot(root);</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>root</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link219 onMouseOver="ShowTip(event, 'tt21', 'link219')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new root.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.rootChanged"></a>rootChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.rootChanged = function(</td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to change the root of the model and update the internal datastructures, such as <a href="#mxGraphModel.cells" class=LVariable id=link220 onMouseOver="ShowTip(event, 'tt8', 'link220')" onMouseOut="HideTip('tt8')">cells</a> and <a href="#mxGraphModel.nextId" class=LVariable id=link221 onMouseOver="ShowTip(event, 'tt13', 'link221')" onMouseOut="HideTip('tt13')">nextId</a>. Returns the previous root.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>root</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link222 onMouseOver="ShowTip(event, 'tt21', 'link222')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new root.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isRoot"></a>isRoot</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isRoot = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is the root of the model and a non-null value.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link223 onMouseOver="ShowTip(event, 'tt21', 'link223')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the possible root.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isLayer"></a>isLayer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isLayer = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if <a href="#mxGraphModel.isRoot" class=LFunction id=link224 onMouseOver="ShowTip(event, 'tt29', 'link224')" onMouseOut="HideTip('tt29')">isRoot</a> returns true for the parent of the given cell.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link225 onMouseOver="ShowTip(event, 'tt21', 'link225')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the possible layer.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isAncestor"></a>isAncestor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isAncestor = function(</td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>child</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given parent is an ancestor of the given child.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>parent</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link226 onMouseOver="ShowTip(event, 'tt21', 'link226')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the parent.</td></tr><tr><td class=CDLEntry>child</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link227 onMouseOver="ShowTip(event, 'tt21', 'link227')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the child.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.contains"></a>contains</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.contains = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the model contains the given <a href="mxCell-js.html#mxCell" class=LClass id=link228 onMouseOver="ShowTip(event, 'tt21', 'link228')" onMouseOut="HideTip('tt21')">mxCell</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link229 onMouseOver="ShowTip(event, 'tt21', 'link229')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getParent"></a>getParent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getParent = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the parent of the given cell.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link230 onMouseOver="ShowTip(event, 'tt21', 'link230')" onMouseOut="HideTip('tt21')">mxCell</a> whose parent should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.add"></a>add</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.add = function(</td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>child,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified child to the parent at the given index using <a href="#mxChildChange" class=LClass id=link231 onMouseOver="ShowTip(event, 'tt35', 'link231')" onMouseOut="HideTip('tt35')">mxChildChange</a> and adds the change to the current transaction. If no index is specified then the child is appended to the parent’s array of children. Returns the inserted child.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>parent</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link232 onMouseOver="ShowTip(event, 'tt21', 'link232')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the parent to contain the child.</td></tr><tr><td class=CDLEntry>child</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link233 onMouseOver="ShowTip(event, 'tt21', 'link233')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the child to be inserted.</td></tr><tr><td class=CDLEntry>index</td><td class=CDLDescription>Optional integer that specifies the index of the child.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cellAdded"></a>cellAdded</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cellAdded = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update <a href="#mxGraphModel.cells" class=LVariable id=link234 onMouseOver="ShowTip(event, 'tt8', 'link234')" onMouseOut="HideTip('tt8')">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><p>(code delete model.cells[cell.getId()]; cell.setId(newId); model.cells[cell.getId()] = cell; (end)</p><p>If the change of the ID should be part of the command history, then the cell should be removed from the model and a clone with the new ID should be reinserted into the model instead.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link235 onMouseOver="ShowTip(event, 'tt21', 'link235')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell that has been added.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.createId"></a>createId</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.createId = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook method to create an Id for the specified cell. This implementation concatenates <a href="#mxGraphModel.prefix" class=LVariable id=link236 onMouseOver="ShowTip(event, 'tt11', 'link236')" onMouseOut="HideTip('tt11')">prefix</a>, id and <a href="#mxGraphModel.postfix" class=LVariable id=link237 onMouseOver="ShowTip(event, 'tt12', 'link237')" onMouseOut="HideTip('tt12')">postfix</a> to create the Id and increments <a href="#mxGraphModel.nextId" class=LVariable id=link238 onMouseOver="ShowTip(event, 'tt13', 'link238')" onMouseOut="HideTip('tt13')">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><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link239 onMouseOver="ShowTip(event, 'tt21', 'link239')" onMouseOut="HideTip('tt21')">mxCell</a> to create the Id for.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.updateEdgeParents"></a>updateEdgeParents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.updateEdgeParents = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the parent for all edges that are connected to cell or one of its descendants using <a href="#mxGraphModel.updateEdgeParent" class=LFunction id=link240 onMouseOver="ShowTip(event, 'tt39', 'link240')" onMouseOut="HideTip('tt39')">updateEdgeParent</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.updateEdgeParent"></a>updateEdgeParent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.updateEdgeParent = function(</td><td class=PParameter nowrap>edge,</td></tr><tr><td></td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the parent of the specified <a href="mxCell-js.html#mxCell" class=LClass id=link241 onMouseOver="ShowTip(event, 'tt21', 'link241')" onMouseOut="HideTip('tt21')">mxCell</a> to the nearest-common-ancestor of its two terminals.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link242 onMouseOver="ShowTip(event, 'tt21', 'link242')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the edge.</td></tr><tr><td class=CDLEntry>root</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link243 onMouseOver="ShowTip(event, 'tt21', 'link243')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the current root of the model.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getOrigin"></a>getOrigin</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getOrigin = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the absolute, accumulated origin for the children inside the given parent as an <a href="../util/mxPoint-js.html#mxPoint" class=LClass id=link244 onMouseOver="ShowTip(event, 'tt41', 'link244')" onMouseOut="HideTip('tt41')">mxPoint</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getNearestCommonAncestor"></a>getNearestCommonAncestor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getNearestCommonAncestor = function(</td><td class=PParameter nowrap>cell1,</td></tr><tr><td></td><td class=PParameter nowrap>cell2</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the nearest common ancestor for the specified cells.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell1</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link245 onMouseOver="ShowTip(event, 'tt21', 'link245')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the first cell in the tree.</td></tr><tr><td class=CDLEntry>cell2</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link246 onMouseOver="ShowTip(event, 'tt21', 'link246')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the second cell in the tree.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.remove"></a>remove</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.remove = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes the specified cell from the model using <a href="#mxChildChange" class=LClass id=link247 onMouseOver="ShowTip(event, 'tt35', 'link247')" onMouseOut="HideTip('tt35')">mxChildChange</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><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link248 onMouseOver="ShowTip(event, 'tt21', 'link248')" onMouseOut="HideTip('tt21')">mxCell</a> that should be removed.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cellRemoved"></a>cellRemoved</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cellRemoved = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update <a href="#mxGraphModel.cells" class=LVariable id=link249 onMouseOver="ShowTip(event, 'tt8', 'link249')" onMouseOut="HideTip('tt8')">cells</a> when a cell has been removed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link250 onMouseOver="ShowTip(event, 'tt21', 'link250')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell that has been removed.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.parentForCellChanged"></a>parentForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.parentForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the parent of a cell using <a href="mxCell-js.html#mxCell.insert" class=LFunction id=link251 onMouseOver="ShowTip(event, 'tt46', 'link251')" onMouseOut="HideTip('tt46')">mxCell.insert</a> on the parent and return the previous parent.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link252 onMouseOver="ShowTip(event, 'tt21', 'link252')" onMouseOut="HideTip('tt21')">mxCell</a> to update the parent for.</td></tr><tr><td class=CDLEntry>parent</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link253 onMouseOver="ShowTip(event, 'tt21', 'link253')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new parent of the cell.</td></tr><tr><td class=CDLEntry>index</td><td class=CDLDescription>Optional integer that defines the index of the child in the parent’s child array.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildCount"></a>getChildCount</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildCount = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the number of children in the given cell.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link254 onMouseOver="ShowTip(event, 'tt21', 'link254')" onMouseOut="HideTip('tt21')">mxCell</a> whose number of children should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildAt"></a>getChildAt</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildAt = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the child of the given <a href="mxCell-js.html#mxCell" class=LClass id=link255 onMouseOver="ShowTip(event, 'tt21', 'link255')" onMouseOut="HideTip('tt21')">mxCell</a> at the given index.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link256 onMouseOver="ShowTip(event, 'tt21', 'link256')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the parent.</td></tr><tr><td class=CDLEntry>index</td><td class=CDLDescription>Integer that specifies the index of the child to be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildren"></a>getChildren</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildren = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all children of the given <a href="mxCell-js.html#mxCell" class=LClass id=link257 onMouseOver="ShowTip(event, 'tt21', 'link257')" onMouseOut="HideTip('tt21')">mxCell</a> as an array of <a href="mxCell-js.html#mxCell" class=LClass id=link258 onMouseOver="ShowTip(event, 'tt21', 'link258')" onMouseOut="HideTip('tt21')">mxCells</a>. The return value should be only be read.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link259 onMouseOver="ShowTip(event, 'tt21', 'link259')" onMouseOut="HideTip('tt21')">mxCell</a> the represents the parent.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildVertices"></a>getChildVertices</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildVertices = function(</td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the child vertices of the given parent.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link260 onMouseOver="ShowTip(event, 'tt21', 'link260')" onMouseOut="HideTip('tt21')">mxCell</a> whose child vertices should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildEdges"></a>getChildEdges</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildEdges = function(</td><td class=PParameter nowrap>parent</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the child edges of the given parent.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link261 onMouseOver="ShowTip(event, 'tt21', 'link261')" onMouseOut="HideTip('tt21')">mxCell</a> whose child edges should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getChildCells"></a>getChildCells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getChildCells = function(</td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>vertices,</td></tr><tr><td></td><td class=PParameter nowrap>edges</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the children of the given cell that are vertices and/or edges depending on the arguments.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link262 onMouseOver="ShowTip(event, 'tt21', 'link262')" onMouseOut="HideTip('tt21')">mxCell</a> the represents the parent.</td></tr><tr><td class=CDLEntry>vertices</td><td class=CDLDescription>Boolean indicating if child vertices should be returned. Default is false.</td></tr><tr><td class=CDLEntry>edges</td><td class=CDLDescription>Boolean indicating if child edges should be returned. Default is false.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getTerminal"></a>getTerminal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getTerminal = function(</td><td class=PParameter nowrap>edge,</td></tr><tr><td></td><td class=PParameter nowrap>isSource</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the source or target <a href="mxCell-js.html#mxCell" class=LClass id=link263 onMouseOver="ShowTip(event, 'tt21', 'link263')" onMouseOut="HideTip('tt21')">mxCell</a> of the given edge depending on the value of the boolean parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link264 onMouseOver="ShowTip(event, 'tt21', 'link264')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the edge.</td></tr><tr><td class=CDLEntry>isSource</td><td class=CDLDescription>Boolean indicating which end of the edge should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setTerminal"></a>setTerminal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setTerminal = function(</td><td class=PParameter nowrap>edge,</td></tr><tr><td></td><td class=PParameter nowrap>terminal,</td></tr><tr><td></td><td class=PParameter nowrap>isSource</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the source or target terminal of the given <a href="mxCell-js.html#mxCell" class=LClass id=link265 onMouseOver="ShowTip(event, 'tt21', 'link265')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="#mxTerminalChange" class=LClass id=link266 onMouseOver="ShowTip(event, 'tt55', 'link266')" onMouseOut="HideTip('tt55')">mxTerminalChange</a> and adds the change to the current transaction. This implementation updates the parent of the edge using <a href="#mxGraphModel.updateEdgeParent" class=LFunction id=link267 onMouseOver="ShowTip(event, 'tt39', 'link267')" onMouseOut="HideTip('tt39')">updateEdgeParent</a> if required.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link268 onMouseOver="ShowTip(event, 'tt21', 'link268')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the edge.</td></tr><tr><td class=CDLEntry>terminal</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link269 onMouseOver="ShowTip(event, 'tt21', 'link269')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new terminal.</td></tr><tr><td class=CDLEntry>isSource</td><td class=CDLDescription>Boolean indicating if the terminal is the new source or target terminal of the edge.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setTerminals"></a>setTerminals</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setTerminals = function(</td><td class=PParameter nowrap>edge,</td></tr><tr><td></td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PParameter nowrap>target</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the source and target <a href="mxCell-js.html#mxCell" class=LClass id=link270 onMouseOver="ShowTip(event, 'tt21', 'link270')" onMouseOut="HideTip('tt21')">mxCell</a> of the given <a href="mxCell-js.html#mxCell" class=LClass id=link271 onMouseOver="ShowTip(event, 'tt21', 'link271')" onMouseOut="HideTip('tt21')">mxCell</a> in a single transaction using <a href="#mxGraphModel.setTerminal" class=LFunction id=link272 onMouseOver="ShowTip(event, 'tt54', 'link272')" onMouseOut="HideTip('tt54')">setTerminal</a> for each end of the edge.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link273 onMouseOver="ShowTip(event, 'tt21', 'link273')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the edge.</td></tr><tr><td class=CDLEntry>source</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link274 onMouseOver="ShowTip(event, 'tt21', 'link274')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new source terminal.</td></tr><tr><td class=CDLEntry>target</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link275 onMouseOver="ShowTip(event, 'tt21', 'link275')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new target terminal.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.terminalForCellChanged"></a>terminalForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.terminalForCellChanged = function(</td><td class=PParameter nowrap>edge,</td></tr><tr><td></td><td class=PParameter nowrap>terminal,</td></tr><tr><td></td><td class=PParameter nowrap>isSource</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner helper function to update the terminal of the edge using <a href="mxCell-js.html#mxCell.insertEdge" class=LFunction id=link276 onMouseOver="ShowTip(event, 'tt58', 'link276')" onMouseOut="HideTip('tt58')">mxCell.insertEdge</a> and return the previous terminal.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link277 onMouseOver="ShowTip(event, 'tt21', 'link277')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the edge to be updated.</td></tr><tr><td class=CDLEntry>terminal</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link278 onMouseOver="ShowTip(event, 'tt21', 'link278')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the new terminal.</td></tr><tr><td class=CDLEntry>isSource</td><td class=CDLDescription>Boolean indicating if the terminal is the new source or target terminal of the edge.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getEdgeCount"></a>getEdgeCount</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getEdgeCount = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the number of distinct edges connected to the given cell.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link279 onMouseOver="ShowTip(event, 'tt21', 'link279')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the vertex.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getEdgeAt"></a>getEdgeAt</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getEdgeAt = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the edge of cell at the given index.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link280 onMouseOver="ShowTip(event, 'tt21', 'link280')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the vertex.</td></tr><tr><td class=CDLEntry>index</td><td class=CDLDescription>Integer that specifies the index of the edge to return.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getDirectedEdgeCount"></a>getDirectedEdgeCount</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getDirectedEdgeCount = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>outgoing,</td></tr><tr><td></td><td class=PParameter nowrap>ignoredEdge</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the number of incoming or outgoing edges, ignoring the given edge.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link281 onMouseOver="ShowTip(event, 'tt21', 'link281')" onMouseOut="HideTip('tt21')">mxCell</a> whose edge count should be returned.</td></tr><tr><td class=CDLEntry>outgoing</td><td class=CDLDescription>Boolean that specifies if the number of outgoing or incoming edges should be returned.</td></tr><tr><td class=CDLEntry>ignoredEdge</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link282 onMouseOver="ShowTip(event, 'tt21', 'link282')" onMouseOut="HideTip('tt21')">mxCell</a> that represents an edge to be ignored.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getConnections"></a>getConnections</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getConnections = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all edges of the given cell without loops.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link283 onMouseOver="ShowTip(event, 'tt21', 'link283')" onMouseOut="HideTip('tt21')">mxCell</a> whose edges should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getIncomingEdges"></a>getIncomingEdges</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getIncomingEdges = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the incoming edges of the given cell without loops.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link284 onMouseOver="ShowTip(event, 'tt21', 'link284')" onMouseOut="HideTip('tt21')">mxCell</a> whose incoming edges should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getOutgoingEdges"></a>getOutgoingEdges</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getOutgoingEdges = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the outgoing edges of the given cell without loops.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link285 onMouseOver="ShowTip(event, 'tt21', 'link285')" onMouseOut="HideTip('tt21')">mxCell</a> whose outgoing edges should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getEdges"></a>getEdges</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getEdges = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>incoming,</td></tr><tr><td></td><td class=PParameter nowrap>outgoing,</td></tr><tr><td></td><td class=PParameter nowrap>includeLoops</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all distinct edges connected to this cell as a new array of <a href="mxCell-js.html#mxCell" class=LClass id=link286 onMouseOver="ShowTip(event, 'tt21', 'link286')" onMouseOut="HideTip('tt21')">mxCells</a>. If at least one of incoming or outgoing is true, then loops are ignored, otherwise if both are false, then all edges connected to the given cell are returned including loops.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link287 onMouseOver="ShowTip(event, 'tt21', 'link287')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell.</td></tr><tr><td class=CDLEntry>incoming</td><td class=CDLDescription>Optional boolean that specifies if incoming edges should be returned. Default is true.</td></tr><tr><td class=CDLEntry>outgoing</td><td class=CDLDescription>Optional boolean that specifies if outgoing edges should be returned. Default is true.</td></tr><tr><td class=CDLEntry>includeLoops</td><td class=CDLDescription>Optional boolean that specifies if loops should be returned. Default is true.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getEdgesBetween"></a>getEdgesBetween</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getEdgesBetween = function(</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PParameter nowrap>target,</td></tr><tr><td></td><td class=PParameter nowrap>directed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><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><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>source</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link288 onMouseOver="ShowTip(event, 'tt21', 'link288')" onMouseOut="HideTip('tt21')">mxCell</a> that defines the source terminal of the edge to be returned.</td></tr><tr><td class=CDLEntry>target</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link289 onMouseOver="ShowTip(event, 'tt21', 'link289')" onMouseOut="HideTip('tt21')">mxCell</a> that defines the target terminal of the edge to be returned.</td></tr><tr><td class=CDLEntry>directed</td><td class=CDLDescription>Optional boolean that specifies if the direction of the edge should be taken into account. Default is false.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getOpposites"></a>getOpposites</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getOpposites = function(</td><td class=PParameter nowrap>edges,</td></tr><tr><td></td><td class=PParameter nowrap>terminal,</td></tr><tr><td></td><td class=PParameter nowrap>sources,</td></tr><tr><td></td><td class=PParameter nowrap>targets</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all opposite vertices wrt terminal for the given edges, only returning sources and/or targets as specified. The result is returned as an array of <a href="mxCell-js.html#mxCell" class=LClass id=link290 onMouseOver="ShowTip(event, 'tt21', 'link290')" onMouseOut="HideTip('tt21')">mxCells</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>edges</td><td class=CDLDescription>Array of <a href="mxCell-js.html#mxCell" class=LClass id=link291 onMouseOver="ShowTip(event, 'tt21', 'link291')" onMouseOut="HideTip('tt21')">mxCells</a> that contain the edges to be examined.</td></tr><tr><td class=CDLEntry>terminal</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link292 onMouseOver="ShowTip(event, 'tt21', 'link292')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the known end of the edges.</td></tr><tr><td class=CDLEntry>sources</td><td class=CDLDescription>Boolean that specifies if source terminals should be contained in the result. Default is true.</td></tr><tr><td class=CDLEntry>targets</td><td class=CDLDescription>Boolean that specifies if target terminals should be contained in the result. Default is true.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getTopmostCells"></a>getTopmostCells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getTopmostCells = function(</td><td class=PParameter nowrap>cells</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the topmost cells of the hierarchy in an array that contains no descendants for each <a href="mxCell-js.html#mxCell" class=LClass id=link293 onMouseOver="ShowTip(event, 'tt21', 'link293')" onMouseOut="HideTip('tt21')">mxCell</a> that it contains. Duplicates should be removed in the cells array to improve performance.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cells</td><td class=CDLDescription>Array of <a href="mxCell-js.html#mxCell" class=LClass id=link294 onMouseOver="ShowTip(event, 'tt21', 'link294')" onMouseOut="HideTip('tt21')">mxCells</a> whose topmost ancestors should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isVertex"></a>isVertex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isVertex = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is a vertex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link295 onMouseOver="ShowTip(event, 'tt21', 'link295')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the possible vertex.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isEdge"></a>isEdge</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isEdge = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is an edge.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link296 onMouseOver="ShowTip(event, 'tt21', 'link296')" onMouseOut="HideTip('tt21')">mxCell</a> that represents the possible edge.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isConnectable"></a>isConnectable</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isConnectable = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given <a href="mxCell-js.html#mxCell" class=LClass id=link297 onMouseOver="ShowTip(event, 'tt21', 'link297')" onMouseOut="HideTip('tt21')">mxCell</a> is connectable. If <edgesConnectable> is false, then this function returns false for all edges else it returns the return value of <a href="mxCell-js.html#mxCell.isConnectable" class=LFunction id=link298 onMouseOver="ShowTip(event, 'tt126', 'link298')" onMouseOut="HideTip('tt126')">mxCell.isConnectable</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link299 onMouseOver="ShowTip(event, 'tt21', 'link299')" onMouseOut="HideTip('tt21')">mxCell</a> whose connectable state should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getValue"></a>getValue</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getValue = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the user object of the given <a href="mxCell-js.html#mxCell" class=LClass id=link300 onMouseOver="ShowTip(event, 'tt21', 'link300')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.getValue" class=LFunction id=link301 onMouseOver="ShowTip(event, 'tt73', 'link301')" onMouseOut="HideTip('tt73')">mxCell.getValue</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link302 onMouseOver="ShowTip(event, 'tt21', 'link302')" onMouseOut="HideTip('tt21')">mxCell</a> whose user object should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setValue"></a>setValue</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setValue = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the user object of then given <a href="mxCell-js.html#mxCell" class=LClass id=link303 onMouseOver="ShowTip(event, 'tt21', 'link303')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="#mxValueChange" class=LClass id=link304 onMouseOver="ShowTip(event, 'tt75', 'link304')" onMouseOut="HideTip('tt75')">mxValueChange</a> and adds the change to the current transaction.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link305 onMouseOver="ShowTip(event, 'tt21', 'link305')" onMouseOut="HideTip('tt21')">mxCell</a> whose user object should be changed.</td></tr><tr><td class=CDLEntry>value</td><td class=CDLDescription>Object that defines the new user object.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.valueForCellChanged"></a>valueForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.valueForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the user object of the given <a href="mxCell-js.html#mxCell" class=LClass id=link306 onMouseOver="ShowTip(event, 'tt21', 'link306')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.valueChanged" class=LFunction id=link307 onMouseOver="ShowTip(event, 'tt77', 'link307')" onMouseOut="HideTip('tt77')">mxCell.valueChanged</a> and return the previous value, that is, the return value of <a href="mxCell-js.html#mxCell.valueChanged" class=LFunction id=link308 onMouseOver="ShowTip(event, 'tt77', 'link308')" onMouseOut="HideTip('tt77')">mxCell.valueChanged</a>.</p><p>To change a specific attribute in an XML node, the following code can be used.</p><blockquote><pre class="prettyprint">graph.getModel().valueForCellChanged = function(cell, value)
|
||
|
{
|
||
|
var previous = cell.value.getAttribute('label');
|
||
|
cell.value.setAttribute('label', value);
|
||
|
|
||
|
return previous;
|
||
|
};</pre></blockquote></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getGeometry"></a>getGeometry</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getGeometry = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <a href="mxGeometry-js.html#mxGeometry" class=LClass id=link309 onMouseOver="ShowTip(event, 'tt79', 'link309')" onMouseOut="HideTip('tt79')">mxGeometry</a> of the given <a href="mxCell-js.html#mxCell" class=LClass id=link310 onMouseOver="ShowTip(event, 'tt21', 'link310')" onMouseOut="HideTip('tt21')">mxCell</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link311 onMouseOver="ShowTip(event, 'tt21', 'link311')" onMouseOut="HideTip('tt21')">mxCell</a> whose geometry should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setGeometry"></a>setGeometry</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setGeometry = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the <a href="mxGeometry-js.html#mxGeometry" class=LClass id=link312 onMouseOver="ShowTip(event, 'tt79', 'link312')" onMouseOut="HideTip('tt79')">mxGeometry</a> of the given <a href="mxCell-js.html#mxCell" class=LClass id=link313 onMouseOver="ShowTip(event, 'tt21', 'link313')" onMouseOut="HideTip('tt21')">mxCell</a>. The actual update of the cell is carried out in <a href="#mxGraphModel.geometryForCellChanged" class=LFunction id=link314 onMouseOver="ShowTip(event, 'tt81', 'link314')" onMouseOut="HideTip('tt81')">geometryForCellChanged</a>. The <a href="#mxGeometryChange" class=LClass id=link315 onMouseOver="ShowTip(event, 'tt127', 'link315')" onMouseOut="HideTip('tt127')">mxGeometryChange</a> action is used to encapsulate the change.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link316 onMouseOver="ShowTip(event, 'tt21', 'link316')" onMouseOut="HideTip('tt21')">mxCell</a> whose geometry should be changed.</td></tr><tr><td class=CDLEntry>geometry</td><td class=CDLDescription><a href="mxGeometry-js.html#mxGeometry" class=LClass id=link317 onMouseOver="ShowTip(event, 'tt79', 'link317')" onMouseOut="HideTip('tt79')">mxGeometry</a> that defines the new geometry.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.geometryForCellChanged"></a>geometryForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.geometryForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the <a href="mxGeometry-js.html#mxGeometry" class=LClass id=link318 onMouseOver="ShowTip(event, 'tt79', 'link318')" onMouseOut="HideTip('tt79')">mxGeometry</a> of the given <a href="mxCell-js.html#mxCell" class=LClass id=link319 onMouseOver="ShowTip(event, 'tt21', 'link319')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.setGeometry" class=LFunction id=link320 onMouseOver="ShowTip(event, 'tt82', 'link320')" onMouseOut="HideTip('tt82')">mxCell.setGeometry</a> and return the previous <a href="mxGeometry-js.html#mxGeometry" class=LClass id=link321 onMouseOver="ShowTip(event, 'tt79', 'link321')" onMouseOut="HideTip('tt79')">mxGeometry</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getStyle"></a>getStyle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getStyle = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the style of the given <a href="mxCell-js.html#mxCell" class=LClass id=link322 onMouseOver="ShowTip(event, 'tt21', 'link322')" onMouseOut="HideTip('tt21')">mxCell</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link323 onMouseOver="ShowTip(event, 'tt21', 'link323')" onMouseOut="HideTip('tt21')">mxCell</a> whose style should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setStyle"></a>setStyle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setStyle = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>style</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the style of the given <a href="mxCell-js.html#mxCell" class=LClass id=link324 onMouseOver="ShowTip(event, 'tt21', 'link324')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="#mxStyleChange" class=LClass id=link325 onMouseOver="ShowTip(event, 'tt85', 'link325')" onMouseOut="HideTip('tt85')">mxStyleChange</a> and adds the change to the current transaction.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link326 onMouseOver="ShowTip(event, 'tt21', 'link326')" onMouseOut="HideTip('tt21')">mxCell</a> whose style should be changed.</td></tr><tr><td class=CDLEntry>style</td><td class=CDLDescription>String of the form [stylename;|key=value;] to specify the new cell style.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.styleForCellChanged"></a>styleForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.styleForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>style</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the style of the given <a href="mxCell-js.html#mxCell" class=LClass id=link327 onMouseOver="ShowTip(event, 'tt21', 'link327')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.setStyle" class=LFunction id=link328 onMouseOver="ShowTip(event, 'tt87', 'link328')" onMouseOut="HideTip('tt87')">mxCell.setStyle</a> and return the previous style.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link329 onMouseOver="ShowTip(event, 'tt21', 'link329')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell to be updated.</td></tr><tr><td class=CDLEntry>style</td><td class=CDLDescription>String of the form [stylename;|key=value;] to specify the new cell style.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isCollapsed"></a>isCollapsed</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isCollapsed = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given <a href="mxCell-js.html#mxCell" class=LClass id=link330 onMouseOver="ShowTip(event, 'tt21', 'link330')" onMouseOut="HideTip('tt21')">mxCell</a> is collapsed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link331 onMouseOver="ShowTip(event, 'tt21', 'link331')" onMouseOut="HideTip('tt21')">mxCell</a> whose collapsed state should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setCollapsed"></a>setCollapsed</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setCollapsed = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>collapsed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the collapsed state of the given <a href="mxCell-js.html#mxCell" class=LClass id=link332 onMouseOver="ShowTip(event, 'tt21', 'link332')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="#mxCollapseChange" class=LClass id=link333 onMouseOver="ShowTip(event, 'tt90', 'link333')" onMouseOut="HideTip('tt90')">mxCollapseChange</a> and adds the change to the current transaction.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link334 onMouseOver="ShowTip(event, 'tt21', 'link334')" onMouseOut="HideTip('tt21')">mxCell</a> whose collapsed state should be changed.</td></tr><tr><td class=CDLEntry>collapsed</td><td class=CDLDescription>Boolean that specifies the new collpased state.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.collapsedStateForCellChanged"></a>collapsedStateForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.collapsedStateForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>collapsed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the collapsed state of the given <a href="mxCell-js.html#mxCell" class=LClass id=link335 onMouseOver="ShowTip(event, 'tt21', 'link335')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.setCollapsed" class=LFunction id=link336 onMouseOver="ShowTip(event, 'tt92', 'link336')" onMouseOut="HideTip('tt92')">mxCell.setCollapsed</a> and return the previous collapsed state.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link337 onMouseOver="ShowTip(event, 'tt21', 'link337')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell to be updated.</td></tr><tr><td class=CDLEntry>collapsed</td><td class=CDLDescription>Boolean that specifies the new collpased state.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.isVisible"></a>isVisible</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.isVisible = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given <a href="mxCell-js.html#mxCell" class=LClass id=link338 onMouseOver="ShowTip(event, 'tt21', 'link338')" onMouseOut="HideTip('tt21')">mxCell</a> is visible.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link339 onMouseOver="ShowTip(event, 'tt21', 'link339')" onMouseOut="HideTip('tt21')">mxCell</a> whose visible state should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.setVisible"></a>setVisible</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.setVisible = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>visible</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the visible state of the given <a href="mxCell-js.html#mxCell" class=LClass id=link340 onMouseOver="ShowTip(event, 'tt21', 'link340')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="#mxVisibleChange" class=LClass id=link341 onMouseOver="ShowTip(event, 'tt95', 'link341')" onMouseOut="HideTip('tt95')">mxVisibleChange</a> and adds the change to the current transaction.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link342 onMouseOver="ShowTip(event, 'tt21', 'link342')" onMouseOut="HideTip('tt21')">mxCell</a> whose visible state should be changed.</td></tr><tr><td class=CDLEntry>visible</td><td class=CDLDescription>Boolean that specifies the new visible state.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.visibleStateForCellChanged"></a>visibleStateForCellChanged</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.visibleStateForCellChanged = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>visible</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to update the visible state of the given <a href="mxCell-js.html#mxCell" class=LClass id=link343 onMouseOver="ShowTip(event, 'tt21', 'link343')" onMouseOut="HideTip('tt21')">mxCell</a> using <a href="mxCell-js.html#mxCell.setCollapsed" class=LFunction id=link344 onMouseOver="ShowTip(event, 'tt92', 'link344')" onMouseOut="HideTip('tt92')">mxCell.setCollapsed</a> and return the previous visible state.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link345 onMouseOver="ShowTip(event, 'tt21', 'link345')" onMouseOut="HideTip('tt21')">mxCell</a> that specifies the cell to be updated.</td></tr><tr><td class=CDLEntry>visible</td><td class=CDLDescription>Boolean that specifies the new visible state.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.execute = function(</td><td class=PParameter nowrap>change</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><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="#mxGraphModel.currentEdit" class=LVariable id=link346 onMouseOver="ShowTip(event, 'tt14', 'link346')" onMouseOut="HideTip('tt14')">currentEdit</a> between <a href="#mxGraphModel.beginUpdate" class=LFunction id=link347 onMouseOver="ShowTip(event, 'tt4', 'link347')" onMouseOut="HideTip('tt4')">beginUpdate</a> and <a href="#mxGraphModel.endUpdate" class=LFunction id=link348 onMouseOver="ShowTip(event, 'tt5', 'link348')" onMouseOut="HideTip('tt5')">endUpdate</a> calls, so that events will be fired if this execute is an individual transaction, that is, if no previous <a href="#mxGraphModel.beginUpdate" class=LFunction id=link349 onMouseOver="ShowTip(event, 'tt4', 'link349')" onMouseOut="HideTip('tt4')">beginUpdate</a> calls have been made without calling <a href="#mxGraphModel.endUpdate" class=LFunction id=link350 onMouseOver="ShowTip(event, 'tt5', 'link350')" onMouseOut="HideTip('tt5')">endUpdate</a>. This implementation fires an <a href="#mxGraphModel.execute" class=LFunction id=link351 onMouseOver="ShowTip(event, 'tt97', 'link351')" onMouseOut="HideTip('tt97')">execute</a> event before executing the given change.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>change</td><td class=CDLDescription>Object that described the change.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.beginUpdate"></a>beginUpdate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.beginUpdate = function()</td></tr></table></blockquote><p>Increments the <a href="#mxGraphModel.updateLevel" class=LVariable id=link352 onMouseOver="ShowTip(event, 'tt3', 'link352')" onMouseOut="HideTip('tt3')">updateLevel</a> by one. The event notification is queued until <a href="#mxGraphModel.updateLevel" class=LVariable id=link353 onMouseOver="ShowTip(event, 'tt3', 'link353')" onMouseOut="HideTip('tt3')">updateLevel</a> reaches 0 by use of <a href="#mxGraphModel.endUpdate" class=LFunction id=link354 onMouseOver="ShowTip(event, 'tt5', 'link354')" onMouseOut="HideTip('tt5')">endUpdate</a>.</p><p>All changes on <a href="#mxGraphModel.mxGraphModel" class=LFunction id=link355 onMouseOver="ShowTip(event, 'tt6', 'link355')" onMouseOut="HideTip('tt6')">mxGraphModel</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="#mxGraphModel.beginUpdate" class=LFunction id=link356 onMouseOver="ShowTip(event, 'tt4', 'link356')" onMouseOut="HideTip('tt4')">beginUpdate</a> and <a href="#mxGraphModel.endUpdate" class=LFunction id=link357 onMouseOver="ShowTip(event, 'tt5', 'link357')" onMouseOut="HideTip('tt5')">endUpdate</a> calls as shown here:</p><blockquote><pre class="prettyprint">var model = graph.getModel();
|
||
|
var parent = graph.getDefaultParent();
|
||
|
var index = model.getChildCount(parent);
|
||
|
model.beginUpdate();
|
||
|
try
|
||
|
{
|
||
|
model.add(parent, v1, index);
|
||
|
model.add(parent, v2, index+1);
|
||
|
}
|
||
|
finally
|
||
|
{
|
||
|
model.endUpdate();
|
||
|
}</pre></blockquote><p>Of course there is a shortcut for appending a sequence of cells into the default parent:</p><blockquote><pre class="prettyprint">graph.addCells([v1, v2]).</pre></blockquote></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.endUpdate"></a>endUpdate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.endUpdate = function()</td></tr></table></blockquote><p>Decrements the <a href="#mxGraphModel.updateLevel" class=LVariable id=link358 onMouseOver="ShowTip(event, 'tt3', 'link358')" onMouseOut="HideTip('tt3')">updateLevel</a> by one and fires an <undo> event if the <a href="#mxGraphModel.updateLevel" class=LVariable id=link359 onMouseOver="ShowTip(event, 'tt3', 'link359')" onMouseOut="HideTip('tt3')">updateLevel</a> reaches 0. This function indirectly fires a <change> event by invoking the notify function on the <a href="#mxGraphModel.currentEdit" class=LVariable id=link360 onMouseOver="ShowTip(event, 'tt14', 'link360')" onMouseOut="HideTip('tt14')">currentEdit</a> und then creates a new <a href="#mxGraphModel.currentEdit" class=LVariable id=link361 onMouseOver="ShowTip(event, 'tt14', 'link361')" onMouseOut="HideTip('tt14')">currentEdit</a> using <a href="#mxGraphModel.createUndoableEdit" class=LFunction id=link362 onMouseOver="ShowTip(event, 'tt98', 'link362')" onMouseOut="HideTip('tt98')">createUndoableEdit</a>.</p><p>The <undo> event is fired only once per edit, whereas the <change> event is fired whenever the notify function is invoked, that is, on undo and redo of the edit.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.createUndoableEdit"></a>createUndoableEdit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.createUndoableEdit = function()</td></tr></table></blockquote><p>Creates a new <a href="../util/mxUndoableEdit-js.html#mxUndoableEdit" class=LClass id=link363 onMouseOver="ShowTip(event, 'tt99', 'link363')" onMouseOut="HideTip('tt99')">mxUndoableEdit</a> that implements the notify function to fire a <change> and <notify> event through the <a href="../util/mxUndoableEdit-js.html#mxUndoableEdit" class=LClass id=link364 onMouseOver="ShowTip(event, 'tt99', 'link364')" onMouseOut="HideTip('tt99')">mxUndoableEdit</a>’s source.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mergeChildren"></a>mergeChildren</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.mergeChildren = function(</td><td class=PParameter nowrap>from,</td></tr><tr><td></td><td class=PParameter nowrap>to,</td></tr><tr><td></td><td class=PParameter nowrap>cloneAllEdges</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><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></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.mergeChildren"></a>mergeChildren</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.mergeChildrenImpl = function(</td><td class=PParameter nowrap>from,</td></tr><tr><td></td><td class=PParameter nowrap>to,</td></tr><tr><td></td><td class=PParameter nowrap>cloneAllEdges,</td></tr><tr><td></td><td class=PParameter nowrap>mapping</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><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></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.getParents"></a>getParents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.getParents = function(</td><td class=PParameter nowrap>cells</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an array that represents the set (no duplicates) of all parents for the given array of cells.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cells</td><td class=CDLDescription>Array of cells whose parents should be returned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cloneCell"></a>cloneCell</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cloneCell = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a deep clone of the given <a href="mxCell-js.html#mxCell" class=LClass id=link365 onMouseOver="ShowTip(event, 'tt21', 'link365')" onMouseOut="HideTip('tt21')">mxCell</a> (including the children) which is created using <a href="#mxGraphModel.cloneCells" class=LFunction id=link366 onMouseOver="ShowTip(event, 'tt103', 'link366')" onMouseOut="HideTip('tt103')">cloneCells</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="mxCell-js.html#mxCell" class=LClass id=link367 onMouseOver="ShowTip(event, 'tt21', 'link367')" onMouseOut="HideTip('tt21')">mxCell</a> to be cloned.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cloneCells"></a>cloneCells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cloneCells = function(</td><td class=PParameter nowrap>cells,</td></tr><tr><td></td><td class=PParameter nowrap>includeChildren</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an array of clones for the given array of <a href="mxCell-js.html#mxCell" class=LClass id=link368 onMouseOver="ShowTip(event, 'tt21', 'link368')" onMouseOut="HideTip('tt21')">mxCells</a>. Depending on the value of includeChildren, a deep clone is created for each cell. Connections are restored based if the corresponding cell is contained in the passed in array.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cells</td><td class=CDLDescription>Array of <a href="mxCell-js.html#mxCell" class=LClass id=link369 onMouseOver="ShowTip(event, 'tt21', 'link369')" onMouseOut="HideTip('tt21')">mxCell</a> to be cloned.</td></tr><tr><td class=CDLEntry>includeChildren</td><td class=CDLDescription>Boolean indicating if the cells should be cloned with all descendants.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cloneCellImpl"></a>cloneCellImpl</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cloneCellImpl = function(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>mapping,</td></tr><tr><td></td><td class=PParameter nowrap>includeChildren</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner helper method for cloning cells recursively.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.cellCloned"></a>cellCloned</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.cellCloned = function(</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for cloning the cell. This returns cell.clone() or any possible exceptions.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGraphModel.restoreClone"></a>restoreClone</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxGraphModel.prototype.restoreClone = function(</td><td class=PParameter nowrap>clone,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>mapping</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner helper method for restoring the connections in a network of cloned cells.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxRootChange"></a>mxRootChange</h2><div class=CBody><p>Action to change the root in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxRootChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxRootChange.mxRootChange" id=link370 onMouseOver="ShowTip(event, 'tt107', 'link370')" onMouseOut="HideTip('tt107')">mxRootChange</a></td><td class=SDescription>Constructs a change of the root in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxRootChange.execute" id=link371 onMouseOver="ShowTip(event, 'tt108', 'link371')" onMouseOut="HideTip('tt108')">execute</a></td><td class=SDescription>Carries out a change of the root using <a href="#mxGraphModel.rootChanged" class=LFunction id=link372 onMouseOver="ShowTip(event, 'tt28', 'link372')" onMouseOut="HideTip('tt28')">mxGraphModel.rootChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxRootChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxRootChange.mxRootChange"></a>mxRootChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxRootChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of the root in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxRootChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxRootChange.prototype.execute = function()</td></tr></table></blockquote><p>Carries out a change of the root using <a href="#mxGraphModel.rootChanged" class=LFunction id=link373 onMouseOver="ShowTip(event, 'tt28', 'link373')" onMouseOut="HideTip('tt28')">mxGraphModel.rootChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxChildChange"></a>mxChildChange</h2><div class=CBody><p>Action to add or remove a child in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxChildChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxChildChange.mxChildChange" id=link374 onMouseOver="ShowTip(event, 'tt109', 'link374')" onMouseOut="HideTip('tt109')">mxChildChange</a></td><td class=SDescription>Constructs a change of a child in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxChildChange.execute" id=link375 onMouseOver="ShowTip(event, 'tt110', 'link375')" onMouseOut="HideTip('tt110')">execute</a></td><td class=SDescription>Changes the parent of <child> using <a href="#mxGraphModel.parentForCellChanged" class=LFunction id=link376 onMouseOver="ShowTip(event, 'tt45', 'link376')" onMouseOut="HideTip('tt45')">mxGraphModel.parentForCellChanged</a> and removes or restores the cell’s connections.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxChildChange.disconnect" >disconnect</a></td><td class=SDescription>Disconnects the given cell recursively from its terminals and stores the previous terminal in the cell’s terminals.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxChildChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxChildChange.mxChildChange"></a>mxChildChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxChildChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>child,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a child in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxChildChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxChildChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the parent of <child> using <a href="#mxGraphModel.parentForCellChanged" class=LFunction id=link377 onMouseOver="ShowTip(event, 'tt45', 'link377')" onMouseOut="HideTip('tt45')">mxGraphModel.parentForCellChanged</a> and removes or restores the cell’s connections.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxChildChange.disconnect"></a>disconnect</h3><div class=CBody><p>Disconnects the given cell recursively from its terminals and stores the previous terminal in the cell’s terminals.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxTerminalChange"></a>mxTerminalChange</h2><div class=CBody><p>Action to change a terminal in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxTerminalChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxTerminalChange.mxTerminalChange" id=link378 onMouseOver="ShowTip(event, 'tt111', 'link378')" onMouseOut="HideTip('tt111')">mxTerminalChange</a></td><td class=SDescription>Constructs a change of a terminal in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxTerminalChange.execute" id=link379 onMouseOver="ShowTip(event, 'tt112', 'link379')" onMouseOut="HideTip('tt112')">execute</a></td><td class=SDescription>Changes the terminal of <cell> to <previous> using <a href="#mxGraphModel.terminalForCellChanged" class=LFunction id=link380 onMouseOver="ShowTip(event, 'tt57', 'link380')" onMouseOut="HideTip('tt57')">mxGraphModel.terminalForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxTerminalChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxTerminalChange.mxTerminalChange"></a>mxTerminalChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxTerminalChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>terminal,</td></tr><tr><td></td><td class=PParameter nowrap>source</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a terminal in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxTerminalChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxTerminalChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the terminal of <cell> to <previous> using <a href="#mxGraphModel.terminalForCellChanged" class=LFunction id=link381 onMouseOver="ShowTip(event, 'tt57', 'link381')" onMouseOut="HideTip('tt57')">mxGraphModel.terminalForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxValueChange"></a>mxValueChange</h2><div class=CBody><p>Action to change a user object in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxValueChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxValueChange.mxValueChange" id=link382 onMouseOver="ShowTip(event, 'tt113', 'link382')" onMouseOut="HideTip('tt113')">mxValueChange</a></td><td class=SDescription>Constructs a change of a user object in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxValueChange.execute" id=link383 onMouseOver="ShowTip(event, 'tt114', 'link383')" onMouseOut="HideTip('tt114')">execute</a></td><td class=SDescription>Changes the value of <cell> to <previous> using <a href="#mxGraphModel.valueForCellChanged" class=LFunction id=link384 onMouseOver="ShowTip(event, 'tt76', 'link384')" onMouseOut="HideTip('tt76')">mxGraphModel.valueForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxValueChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxValueChange.mxValueChange"></a>mxValueChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxValueChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a user object in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxValueChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxValueChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the value of <cell> to <previous> using <a href="#mxGraphModel.valueForCellChanged" class=LFunction id=link385 onMouseOver="ShowTip(event, 'tt76', 'link385')" onMouseOut="HideTip('tt76')">mxGraphModel.valueForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxStyleChange"></a>mxStyleChange</h2><div class=CBody><p>Action to change a cell’s style in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxStyleChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxStyleChange.mxStyleChange" id=link386 onMouseOver="ShowTip(event, 'tt115', 'link386')" onMouseOut="HideTip('tt115')">mxStyleChange</a></td><td class=SDescription>Constructs a change of a style in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxStyleChange.execute" id=link387 onMouseOver="ShowTip(event, 'tt116', 'link387')" onMouseOut="HideTip('tt116')">execute</a></td><td class=SDescription>Changes the style of <cell> to <previous> using <a href="#mxGraphModel.styleForCellChanged" class=LFunction id=link388 onMouseOver="ShowTip(event, 'tt86', 'link388')" onMouseOut="HideTip('tt86')">mxGraphModel.styleForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxStyleChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxStyleChange.mxStyleChange"></a>mxStyleChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxStyleChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>style</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a style in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxStyleChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxStyleChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the style of <cell> to <previous> using <a href="#mxGraphModel.styleForCellChanged" class=LFunction id=link389 onMouseOver="ShowTip(event, 'tt86', 'link389')" onMouseOut="HideTip('tt86')">mxGraphModel.styleForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxGeometryChange"></a>mxGeometryChange</h2><div class=CBody><p>Action to change a cell’s geometry in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxGeometryChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxGeometryChange.mxGeometryChange" id=link390 onMouseOver="ShowTip(event, 'tt117', 'link390')" onMouseOut="HideTip('tt117')">mxGeometryChange</a></td><td class=SDescription>Constructs a change of a geometry in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxGeometryChange.execute" id=link391 onMouseOver="ShowTip(event, 'tt118', 'link391')" onMouseOut="HideTip('tt118')">execute</a></td><td class=SDescription>Changes the geometry of <cell> ro <previous> using <a href="#mxGraphModel.geometryForCellChanged" class=LFunction id=link392 onMouseOver="ShowTip(event, 'tt81', 'link392')" onMouseOut="HideTip('tt81')">mxGraphModel.geometryForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxGeometryChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGeometryChange.mxGeometryChange"></a>mxGeometryChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxGeometryChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a geometry in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxGeometryChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGeometryChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the geometry of <cell> ro <previous> using <a href="#mxGraphModel.geometryForCellChanged" class=LFunction id=link393 onMouseOver="ShowTip(event, 'tt81', 'link393')" onMouseOut="HideTip('tt81')">mxGraphModel.geometryForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxCollapseChange"></a>mxCollapseChange</h2><div class=CBody><p>Action to change a cell’s collapsed state in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxCollapseChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxCollapseChange.mxCollapseChange" id=link394 onMouseOver="ShowTip(event, 'tt119', 'link394')" onMouseOut="HideTip('tt119')">mxCollapseChange</a></td><td class=SDescription>Constructs a change of a collapsed state in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxCollapseChange.execute" id=link395 onMouseOver="ShowTip(event, 'tt120', 'link395')" onMouseOut="HideTip('tt120')">execute</a></td><td class=SDescription>Changes the collapsed state of <cell> to <previous> using <a href="#mxGraphModel.collapsedStateForCellChanged" class=LFunction id=link396 onMouseOver="ShowTip(event, 'tt91', 'link396')" onMouseOut="HideTip('tt91')">mxGraphModel.collapsedStateForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxCollapseChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxCollapseChange.mxCollapseChange"></a>mxCollapseChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxCollapseChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>collapsed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a collapsed state in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxCollapseChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxCollapseChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the collapsed state of <cell> to <previous> using <a href="#mxGraphModel.collapsedStateForCellChanged" class=LFunction id=link397 onMouseOver="ShowTip(event, 'tt91', 'link397')" onMouseOut="HideTip('tt91')">mxGraphModel.collapsedStateForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxVisibleChange"></a>mxVisibleChange</h2><div class=CBody><p>Action to change a cell’s visible state in a model.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxVisibleChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxVisibleChange.mxVisibleChange" id=link398 onMouseOver="ShowTip(event, 'tt121', 'link398')" onMouseOut="HideTip('tt121')">mxVisibleChange</a></td><td class=SDescription>Constructs a change of a visible state in the specified model.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxVisibleChange.execute" id=link399 onMouseOver="ShowTip(event, 'tt122', 'link399')" onMouseOut="HideTip('tt122')">execute</a></td><td class=SDescription>Changes the visible state of <cell> to <previous> using <a href="#mxGraphModel.visibleStateForCellChanged" class=LFunction id=link400 onMouseOver="ShowTip(event, 'tt96', 'link400')" onMouseOut="HideTip('tt96')">mxGraphModel.visibleStateForCellChanged</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxVisibleChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxVisibleChange.mxVisibleChange"></a>mxVisibleChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxVisibleChange(</td><td class=PParameter nowrap>model,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>visible</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a visible state in the specified model.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxVisibleChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxVisibleChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the visible state of <cell> to <previous> using <a href="#mxGraphModel.visibleStateForCellChanged" class=LFunction id=link401 onMouseOver="ShowTip(event, 'tt96', 'link401')" onMouseOut="HideTip('tt96')">mxGraphModel.visibleStateForCellChanged</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="mxCellAttributeChange"></a>mxCellAttributeChange</h2><div class=CBody><p>Action to change the attribute of a cell’s user object. There is no method on the graph model that uses this action. To use the action, you can use the code shown in the example below.</p><h4 class=CHeading>Example</h4><p>To change the attributeName in the cell’s user object to attributeValue, use the following code:</p><blockquote><pre class="prettyprint">model.beginUpdate();
|
||
|
try
|
||
|
{
|
||
|
var edit = new mxCellAttributeChange(
|
||
|
cell, attributeName, attributeValue);
|
||
|
model.execute(edit);
|
||
|
}
|
||
|
finally
|
||
|
{
|
||
|
model.endUpdate();
|
||
|
}</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#mxCellAttributeChange.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxCellAttributeChange.mxCellAttributeChange" id=link402 onMouseOver="ShowTip(event, 'tt123', 'link402')" onMouseOut="HideTip('tt123')">mxCellAttributeChange</a></td><td class=SDescription>Constructs a change of a attribute of the DOM node stored as the value of the given <a href="mxCell-js.html#mxCell" class=LClass id=link403 onMouseOver="ShowTip(event, 'tt21', 'link403')" onMouseOut="HideTip('tt21')">mxCell</a>.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#mxCellAttributeChange.execute" id=link404 onMouseOver="ShowTip(event, 'tt124', 'link404')" onMouseOut="HideTip('tt124')">execute</a></td><td class=SDescription>Changes the attribute of the cell’s user object by using <a href="mxCell-js.html#mxCell.setAttribute" class=LFunction id=link405 onMouseOver="ShowTip(event, 'tt125', 'link405')" onMouseOut="HideTip('tt125')">mxCell.setAttribute</a>.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxCellAttributeChange.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxCellAttributeChange.mxCellAttributeChange"></a>mxCellAttributeChange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxCellAttributeChange(</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>attribute,</td></tr><tr><td></td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a change of a attribute of the DOM node stored as the value of the given <a href="mxCell-js.html#mxCell" class=LClass id=link406 onMouseOver="ShowTip(event, 'tt21', 'link406')" onMouseOut="HideTip('tt21')">mxCell</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxCellAttributeChange.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxCellAttributeChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the attribute of the cell’s user object by using <a href="mxCell-js.html#mxCell.setAttribute" class=LFunction id=link407 onMouseOver="ShowTip(event, 'tt125', 'link407')" onMouseOut="HideTip('tt125')">mxCell.setAttribute</a>.</p></div></div></div>
|
||
|
|
||
|
</div><!--Content-->
|
||
|
|
||
|
|
||
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
||
|
|
||
|
|
||
|
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../editor/mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxEditor-js.html">mxEditor</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxObjectCodec-js.html">mxObjectCodec</a></div></div><div
|
||
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
|
||
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
||
|
HideAllBut([8, 7], 13);// --></script></div><!--Menu-->
|
||
|
|
||
|
|
||
|
|
||
|
<!--START_ND_TOOLTIPS-->
|
||
|
<div class=CToolTip id="tt1"><div class=CClass>Base class for objects that dispatch named events. </div></div><div class=CToolTip id="tt2"><div class=CEvent>Fires when an undoable edit is dispatched. </div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.updateLevel</td></tr></table></blockquote>Counter for the depth of nested transactions. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.beginUpdate = function()</td></tr></table></blockquote>Increments the updateLevel by one. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.endUpdate = function()</td></tr></table></blockquote>Decrements the updateLevel by one and fires an undo event if the updateLevel reaches 0. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxGraphModel(</td><td class=PParameter nowrap>root</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new graph model. </div></div><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.root</td></tr></table></blockquote>Holds the root cell, which in turn contains the cells that represent the layers of the diagram as child cells. </div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.cells</td></tr></table></blockquote>Maps from Ids to cells.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.maintainEdgeParent</td></tr></table></blockquote>Specifies if edges should automatically be moved into the nearest common ancestor of their terminals. </div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.createIds</td></tr></table></blockquote>Specifies if the model should automatically create Ids for new cells. </div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.prefix</td></tr></table></blockquote>Defines the prefix of new Ids. </div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.postfix</td></tr></table></blockquote>Defines the postfix of new Ids. </div></div><div class=CToolTip id="tt13"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.nextId</td></tr></table></blockquote>Specifies the next Id to be created. </div></div><div class=CToolTip id="tt14"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.currentEdit</td></tr></table></blockquote>Holds the changes for the current transaction. </div></div><div class=CToolTip id="tt15"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraphModel.prototype.endingUpdate</td></tr></table></blockquote>True if the program flow is currently inside endUpdate.</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype pret
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
||
|
|
||
|
|
||
|
<script language=JavaScript><!--
|
||
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|