<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxUtils"></a>mxUtils</h1><divclass=CBody><p>A singleton class that provides cross-browser helper methods. This is a global functionality. To access the functions in this class, use the global classname appended by the functionname. You may have to load chrome://global/content/contentAreaUtils.js to disable certain security restrictions in Mozilla for the <ahref="#mxUtils.open"class=LFunctionid=link110onMouseOver="ShowTip(event, 'tt33', 'link110')"onMouseOut="HideTip('tt33')">open</a>, <ahref="#mxUtils.save"class=LFunctionid=link111onMouseOver="ShowTip(event, 'tt34', 'link111')"onMouseOut="HideTip('tt34')">save</a>, <ahref="#mxUtils.saveAs"class=LFunctionid=link112onMouseOver="ShowTip(event, 'tt35', 'link112')"onMouseOut="HideTip('tt35')">saveAs</a> and <ahref="#mxUtils.copy"class=LFunctionid=link113onMouseOver="ShowTip(event, 'tt36', 'link113')"onMouseOut="HideTip('tt36')">copy</a> function.</p><h4class=CHeading>For example, the following code displays an error message</h4><blockquote><preclass="prettyprint">mxUtils.error('Browser is not supported!', 200, false);</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxUtils">mxUtils</a></td><tdclass=SDescription>A singleton class that provides cross-browser helper methods. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxUtils.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxUtils.errorResource">errorResource</a></td><tdclass=SDescription>Specifies the resource key for the title of the error window. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxUtils.closeResource">closeResource</a></td><tdclass=SDescription>Specifies the resource key for the label of the close button. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxUtils.errorImage">errorImage</a></td><tdclass=SDescription>Defines the image used for error dialogs.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxUtils.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxUtils.removeCursors"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">removeCursors</a></td><tdclass=SDescription>Removes the cursors from the style of the given DOM node and its descendants.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxUtils.repaintGraph"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">repaintGraph</a></td><tdclass=SDescription>Normally not required, this contains the code to workaround a repaint issue and force a repaint of the graph container in AppleWebKit.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxUtils.getCurrentStyle"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">getCurrentStyle</a></td><tdclass=SDescription>Returns the current style of the specified element.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxUtils.hasScrollbars"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">hasScrollbars</a></td><tdclass=SDescription>Returns true if the overflow CSS property of the given node is either scroll or auto.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxUtils.bind"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">bind</a></td><tdclass=SDescription>Returns a wrapper function that locks the execution scope of the given function to the specified scope. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxUtils.eval"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">eval</a
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxUtils.errorResource"></a>errorResource</h3><divclass=CBody><p>Specifies the resource key for the title of the error window. If the resource for this key does not exist then the value is used as the title. Default is ‘error’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxUtils.closeResource"></a>closeResource</h3><divclass=CBody><p>Specifies the resource key for the label of the close button. If the resource for this key does not exist then the value is used as the label. Default is ‘close’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxUtils.errorImage"></a>errorImage</h3><divclass=CBody><p>Defines the image used for error dialogs.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.removeCursors"></a>removeCursors</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>removeCursors: function(</td><tdclass=PParameternowrap>element</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes the cursors from the style of the given DOM node and its descendants.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>element</td><tdclass=CDLDescription>DOM node to remove the cursor style from.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.repaintGraph"></a>repaintGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>repaintGraph: function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>pt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Normally not required, this contains the code to workaround a repaint issue and force a repaint of the graph container in AppleWebKit.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription><ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link114onMouseOver="ShowTip(event, 'tt104', 'link114')"onMouseOut="HideTip('tt104')">mxGraph</a> to be repainted.</td></tr><tr><tdclass=CDLEntry>pt</td><tdclass=CDLDescription><ahref="mxPoint-js.html#mxPoint"class=LClassid=link115onMouseOver="ShowTip(event, 'tt62', 'link115')"onMouseOut="HideTip('tt62')">mxPoint</a> where the dummy element should be placed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getCurrentStyle"></a>getCurrentStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>getCurrentStyle: function()</td></tr></table></blockquote><p>Returns the current style of the specified element.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>element</td><tdclass=CDLDescription>DOM node whose current style should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.hasScrollbars"></a>hasScrollbars</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>hasScrollbars: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the overflow CSS property of the given node is either scroll or auto.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node whose style should be checked for scrollbars.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.bind"></a>bind</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>bind: function(</td><tdclass=PParameternowrap>scope,</td></tr><tr><td></td><tdclass=PParameternowrap>funct</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a wrapper function that locks the execution scope of the given function to the specified scope. Inside funct, the “this” keyword becomes a reference to that scope.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.eval"></a>eval</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>eval: function(</td><tdclass=PParameternowrap>expr</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Evaluates the given expression using eval and returns the JavaScript object that represents the expression result. Supports evaluation of expressions that define functions and returns the function object for these expressions.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>expr</td><tdclass=CDLDescription>A string that represents a JavaScript expression.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.findNode"></a>findNode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>findNode: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the first node where attr equals value. This implementation does not use XPath.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.findNodeByAttribute"></a>findNodeByAttribute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>findNodeByAttribute: function()</td></tr></table></blockquote><p>Returns the first node where the given attribute matches the given value.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>Root node where the search should start.</td></tr><tr><tdclass=CDLEntry>attr</td><tdclass=CDLDescription>Name of the attribute to be checked.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Value of the attribute to match.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getFunctionName"></a>getFunctionName</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getFunctionName: function(</td><tdclass=PParameternowrap>f</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the name for the given function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>f</td><tdclass=CDLDescription>JavaScript object that represents a function.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.indexOf"></a>indexOf</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>indexOf: function(</td><tdclass=PParameternowrap>array,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the index of obj in array or -1 if the array does not contains the given object.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>array</td><tdclass=CDLDescription>Array to check for the given obj.</td></tr><tr><tdclass=CDLEntry>obj</td><tdclass=CDLDescription>Object to find in the given array.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.remove"></a>remove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>remove: function(</td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>array</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes all occurrences of the given object in the given array or object. If there are multiple occurrences of the object, be they associative or as an array entry, all occurrences are removed from the array or deleted from the object. By removing the object from the array, all elements following the removed element are shifted by one step towards the beginning of the array.</p><p>The length of arrays is not modified inside this function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>obj</td><tdclass=CDLDescription>Object to find in the given array.</td></tr><tr><tdclass=CDLEntry>array</td><tdclass=CDLDescription>Array to check for the given obj.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.isNode"></a>isNode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>isNode: function(</td><tdclass=PParameternowrap>value,</td></tr><tr><td></td><tdclass=PParameternowrap>nodeName,</td></tr><tr><td></td><tdclass=PParameternowrap>attributeName,</td></tr><tr><td></td><tdclass=PParameternowrap>attributeValue</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given value is an XML node with the node name and if the optional attribute has the specified value.</p><p>This implementation assumes that the given value is a DOM node if the nodeType property is numeric, that is, if isNaN returns false for value.nodeType.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Object that should be examined as a node.</td></tr><tr><tdclass=CDLEntry>nodeName</td><tdclass=CDLDescription>String that specifies the node name.</td></tr><tr><tdclass=CDLEntry>attributeName</td><tdclass=CDLDescription>Optional attribute name to check.</td></tr><tr><tdclass=CDLEntry>attributeValue</td><tdclass=CDLDescription>Optional attribute value to check.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getChildNodes"></a>getChildNodes</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getChildNodes: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>nodeType</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an array of child nodes that are of the given node type.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>Parent DOM node to return the children from.</td></tr><tr><tdclass=CDLEntry>nodeType</td><tdclass=CDLDescription>Optional node type to return. Default is <ahref="mxConstants-js.html#mxConstants.NODETYPE_ELEMENT"class=LVariableid=link116onMouseOver="ShowTip(event, 'tt105', 'link116')"onMouseOut="HideTip('tt105')">mxConstants.NODETYPE_ELEMENT</a>.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.createXmlDocument"></a>createXmlDocument</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>createXmlDocument: function()</td></tr></table></blockquote><p>Returns a new, empty XML document.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.parseXml"></a>parseXml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>parseXml: function()</td></tr></table></blockquote><p>Parses the specified XML string into a new XML document and returns the new document.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var doc = mxUtils.parseXml(
'</mxCell></MyObject></root></mxGraphModel>');</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>xml</td><tdclass=CDLDescription>String that contains the XML data.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.clearSelection"></a>clearSelection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>clearSelection: function()</td></tr></table></blockquote><p>Clears the current selection in the page.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getPrettyXML"></a>getPrettyXML</h3><divclass=CBody><p>Returns a pretty printed string that represents the XML tree for the given node. This method should only be used to print XML for reading, use <ahref="#mxUtils.getXml"class=LFunctionid=link117onMouseOver="ShowTip(event, 'tt20', 'link117')"onMouseOut="HideTip('tt20')">getXml</a> instead to obtain a string for processing.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to return the XML for.</td></tr><tr><tdclass=CDLEntry>tab</td><tdclass=CDLDescription>Optional string that specifies the indentation for one level. Default is two spaces.</td></tr><tr><tdclass=CDLEntry>indent</td><tdclass=CDLDescription>Optional string that represents the current indentation. Default is an empty string.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.removeWhitespace"></a>removeWhitespace</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>removeWhitespace: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>before</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes the sibling text nodes for the given node that only consists of tabs, newlines and spaces.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node whose siblings should be removed.</td></tr><tr><tdclass=CDLEntry>before</td><tdclass=CDLDescription>Optional boolean that specifies the direction of the traversal.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.htmlEntities"></a>htmlEntities</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>htmlEntities: function(</td><tdclass=PParameternowrap>s,</td></tr><tr><td></td><tdclass=PParameternowrap>newline</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Replaces characters (less than, greater than, newlines and quotes) with their HTML entities in the given string and returns the result.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>s</td><tdclass=CDLDescription>String that contains the characters to be converted.</td></tr><tr><tdclass=CDLEntry>newline</td><tdclass=CDLDescription>If newlines should be replaced. Default is true.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.isVml"></a>isVml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>isVml: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given node is in the VML namespace.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node whose tag urn should be checked.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getXml"></a>getXml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getXml: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>linefeed</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the XML content of the specified node. For Internet Explorer, all \r\n\t[\t]* are removed from the XML string and the remaining \r\n are replaced by \n. All \n are then replaced with linefeed, or &#xa; if no linefeed is defined.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to return the XML for.</td></tr><tr><tdclass=CDLEntry>linefeed</td><tdclass=CDLDescription>Optional string that linefeeds are converted into. Default is &#xa;</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getTextContent"></a>getTextContent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getTextContent: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the text content of the specified node.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to return the text content for.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getInnerHtml"></a>getInnerHtml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>getInnerHtml: function()</td></tr></table></blockquote><p>Returns the inner HTML for the given node as a string or an empty string if no node was specified. The inner HTML is the text representing all children of the node, but not the node itself.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to return the inner HTML for.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getOuterHtml"></a>getOuterHtml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>getOuterHtml: function()</td></tr></table></blockquote><p>Returns the outer HTML for the given node as a string or an empty string if no node was specified. The outer HTML is the text representing all children of the node including the node itself.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to return the outer HTML for.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.write"></a>write</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>write: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a text node for the given string and appends it to the given parent. Returns the text node.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to append the text node to.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String representing the text to be added.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.writeln"></a>writeln</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>writeln: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a text node for the given string and appends it to the given parent with an additional linefeed. Returns the text node.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to append the text node to.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String representing the text to be added.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.br"></a>br</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>br: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>count</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Appends a linebreak to the given parent and returns the linebreak.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to append the linebreak to.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.button"></a>button</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>button: function(</td><tdclass=PParameternowrap>label,</td></tr><tr><td></td><tdclass=PParameternowrap>funct,</td></tr><tr><td></td><tdclass=PParameternowrap>doc</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a new button with the given level and function as an onclick event handler.</p><blockquote><preclass="prettyprint">document.body.appendChild(mxUtils.button('Test', function(evt)
{
alert('Hello, World!');
}));</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>label</td><tdclass=CDLDescription>String that represents the label of the button.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Function to be called if the button is pressed.</td></tr><tr><tdclass=CDLEntry>doc</td><tdclass=CDLDescription>Optional document to be used for creating the button. Default is the current document.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.para"></a>para</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>para: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Appends a new paragraph with the given text to the specified parent and returns the paragraph.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to append the text node to.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String representing the text for the new paragraph.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.linkAction"></a>linkAction</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>linkAction: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text,</td></tr><tr><td></td><tdclass=PParameternowrap>editor,</td></tr><tr><td></td><tdclass=PParameternowrap>action,</td></tr><tr><td></td><tdclass=PParameternowrap>pad</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a hyperlink to the specified parent that invokes action on the specified editor.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to contain the new link.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String that is used as the link label.</td></tr><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription><ahref="../editor/mxEditor-js.html#mxEditor"class=LClassid=link118onMouseOver="ShowTip(event, 'tt106', 'link118')"onMouseOut="HideTip('tt106')">mxEditor</a> that will execute the action.</td></tr><tr><tdclass=CDLEntry>action</td><tdclass=CDLDescription>String that defines the name of the action to be executed.</td></tr><tr><tdclass=CDLEntry>pad</td><tdclass=CDLDescription>Optional left-padding for the link. Default is 0.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.linkInvoke"></a>linkInvoke</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>linkInvoke: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text,</td></tr><tr><td></td><tdclass=PParameternowrap>editor,</td></tr><tr><td></td><tdclass=PParameternowrap>functName,</td></tr><tr><td></td><tdclass=PParameternowrap>arg,</td></tr><tr><td></td><tdclass=PParameternowrap>pad</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a hyperlink to the specified parent that invokes the specified function on the editor passing along the specified argument. The function name is the name of a function of the editor instance, not an action name.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to contain the new link.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String that is used as the link label.</td></tr><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription><ahref="../editor/mxEditor-js.html#mxEditor"class=LClassid=link119onMouseOver="ShowTip(event, 'tt106', 'link119')"onMouseOut="HideTip('tt106')">mxEditor</a> instance to execute the function on.</td></tr><tr><tdclass=CDLEntry>functName</td><tdclass=CDLDescription>String that represents the name of the function.</td></tr><tr><tdclass=CDLEntry>arg</td><tdclass=CDLDescription>Object that represents the argument to the function.</td></tr><tr><tdclass=CDLEntry>pad</td><tdclass=CDLDescription>Optional left-padding for the link. Default is 0.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.link"></a>link</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>link: function(</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text,</td></tr><tr><td></td><tdclass=PParameternowrap>funct,</td></tr><tr><td></td><tdclass=PParameternowrap>pad</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a hyperlink to the specified parent and invokes the given function when the link is clicked.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node to contain the new link.</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String that is used as the link label.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Function to execute when the link is clicked.</td></tr><tr><tdclass=CDLEntry>pad</td><tdclass=CDLDescription>Optional left-padding for the link. Default is 0.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.fit"></a>fit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>fit: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Makes sure the given node is inside the visible area of the window. This is done by setting the left and top in the style.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.open"></a>open</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>open: function(</td><tdclass=PParameternowrap>filename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Opens the specified file from the local filesystem and returns the contents of the file as a string. This implementation requires an ActiveX object in IE and special privileges in Firefox. Relative filenames are only supported in IE and will go onto the users’ Desktop. You may have to load chrome://global/content/contentAreaUtils.js to disable certain security restrictions in Mozilla for this to work.</p><p>See known-issues before using this function.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var data = mxUtils.open('C:\\temp\\test.txt');
mxUtils.alert('Data: '+data);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>filename</td><tdclass=CDLDescription>String representing the local file name.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.save"></a>save</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>save: function(</td><tdclass=PParameternowrap>filename,</td></tr><tr><td></td><tdclass=PParameternowrap>content</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Saves the specified content in the given file on the local file system. This implementation requires an ActiveX object in IE and special privileges in Firefox. Relative filenames are only supported in IE and will be loaded from the users’ Desktop. You may have to load chrome://global/content/contentAreaUtils.js to disable certain security restrictions in Mozilla for this to work.</p><p>See known-issues before using this function.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var data = 'Hello, World!';
mxUtils.save('C:\\test.txt', data);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>filename</td><tdclass=CDLDescription>String representing the local file name.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.saveAs"></a>saveAs</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>saveAs: function(</td><tdclass=PParameternowrap>content</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Saves the specified content by displaying a dialog to save the content as a file on the local filesystem. This implementation does not use an ActiveX object in IE, however, it does require special privileges in Firefox. You may have to load chrome://global/content/contentAreaUtils.js to disable certain security restrictions in Mozilla for this to work.</p><p>See known-issues before using this function. It is not recommended using this function in production environment as access to the filesystem cannot be guaranteed in Firefox. The following code is used in Firefox to try and enable saving to the filesystem.</p><blockquote><preclass="prettyprint">netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');</pre></blockquote><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxUtils.saveAs('Hello, World!');</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>content</td><tdclass=CDLDescription>String representing the file’s content.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.copy"></a>copy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>copy: function(</td><tdclass=PParameternowrap>content</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Copies the specified content to the local clipboard. This implementation requires special privileges in Firefox. You may have to load chrome://global/content/contentAreaUtils.js to disable certain security restrictions in Mozilla for this to work.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>content</td><tdclass=CDLDescription>String to be copied to the clipboard.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.load"></a>load</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>load: function(</td><tdclass=PParameternowrap>url</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Loads the specified URL <b>synchronously</b> and returns the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link120onMouseOver="ShowTip(event, 'tt38', 'link120')"onMouseOut="HideTip('tt38')">mxXmlRequest</a>. Throws an exception if the file cannot be loaded. See <ahref="#mxUtils.get"class=LFunctionid=link121onMouseOver="ShowTip(event, 'tt39', 'link121')"onMouseOut="HideTip('tt39')">mxUtils.get</a> for an asynchronous implementation.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">try
{
var req = mxUtils.load(filename);
var root = req.getDocumentElement();
// Process XML DOM...
}
catch (ex)
{
mxUtils.alert('Cannot load '+filename+': '+ex);
}</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>url</td><tdclass=CDLDescription>URL to get the data from.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.get"></a>get</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>get: function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>onload,</td></tr><tr><td></td><tdclass=PParameternowrap>onerror</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Loads the specified URL <b>asynchronously</b> and invokes the given functions depending on the request status. Returns the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link122onMouseOver="ShowTip(event, 'tt38', 'link122')"onMouseOut="HideTip('tt38')">mxXmlRequest</a> in use. Both functions take the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link123onMouseOver="ShowTip(event, 'tt38', 'link123')"onMouseOut="HideTip('tt38')">mxXmlRequest</a> as the only parameter. See <ahref="#mxUtils.load"class=LFunctionid=link124onMouseOver="ShowTip(event, 'tt37', 'link124')"onMouseOut="HideTip('tt37')">mxUtils.load</a> for a synchronous implementation.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxUtils.get(url, function(req)
{
var node = req.getDocumentElement();
// Process XML DOM...
});</pre></blockquote><p>So for example, to load a diagram into an existing graph model, the following code is used.</p><blockquote><preclass="prettyprint">mxUtils.get(url, function(req)
{
var node = req.getDocumentElement();
var dec = new mxCodec(node.ownerDocument);
dec.decode(node, graph.getModel());
});</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>url</td><tdclass=CDLDescription>URL to get the data from.</td></tr><tr><tdclass=CDLEntry>onload</td><tdclass=CDLDescription>Optional function to execute for a successful response.</td></tr><tr><tdclass=CDLEntry>onerror</td><tdclass=CDLDescription>Optional function to execute on error.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.post"></a>post</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>post: function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>params,</td></tr><tr><td></td><tdclass=PParameternowrap>onload,</td></tr><tr><td></td><tdclass=PParameternowrap>onerror</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Posts the specified params to the given URL <b>asynchronously</b> and invokes the given functions depending on the request status. Returns the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link125onMouseOver="ShowTip(event, 'tt38', 'link125')"onMouseOut="HideTip('tt38')">mxXmlRequest</a> in use. Both functions take the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link126onMouseOver="ShowTip(event, 'tt38', 'link126')"onMouseOut="HideTip('tt38')">mxXmlRequest</a> as the only parameter. Make sure to use encodeURIComponent for the parameter values.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxUtils.post(url, 'key=value', function(req)
// Process req.getDocumentElement() using DOM API if OK...
});</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>url</td><tdclass=CDLDescription>URL to get the data from.</td></tr><tr><tdclass=CDLEntry>params</td><tdclass=CDLDescription>Parameters for the post request.</td></tr><tr><tdclass=CDLEntry>onload</td><tdclass=CDLDescription>Optional function to execute for a successful response.</td></tr><tr><tdclass=CDLEntry>onerror</td><tdclass=CDLDescription>Optional function to execute on error.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.submit"></a>submit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>submit: function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>params,</td></tr><tr><td></td><tdclass=PParameternowrap>doc,</td></tr><tr><td></td><tdclass=PParameternowrap>target</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Submits the given parameters to the specified URL using <ahref="mxXmlRequest-js.html#mxXmlRequest.simulate"class=LFunctionid=link127onMouseOver="ShowTip(event, 'tt42', 'link127')"onMouseOut="HideTip('tt42')">mxXmlRequest.simulate</a> and returns the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link128onMouseOver="ShowTip(event, 'tt38', 'link128')"onMouseOut="HideTip('tt38')">mxXmlRequest</a>. Make sure to use encodeURIComponent for the parameter values.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>url</td><tdclass=CDLDescription>URL to get the data from.</td></tr><tr><tdclass=CDLEntry>params</td><tdclass=CDLDescription>Parameters for the form.</td></tr><tr><tdclass=CDLEntry>doc</td><tdclass=CDLDescription>Document to create the form in.</td></tr><tr><tdclass=CDLEntry>target</td><tdclass=CDLDescription>Target to send the form result to.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.loadInto"></a>loadInto</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>loadInto: function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>doc,</td></tr><tr><td></td><tdclass=PParameternowrap>onload</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Loads the specified URL <b>asynchronously</b> into the specified document, invoking onload after the document has been loaded. This implementation does not use <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link129onMouseOver="ShowTip(event, 'tt38', 'link129')"onMouseOut="HideTip('tt38')">mxXmlRequest</a>, but the document.load method.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>url</td><tdclass=CDLDescription>URL to get the data from.</td></tr><tr><tdclass=CDLEntry>doc</td><tdclass=CDLDescription>The document to load the URL into.</td></tr><tr><tdclass=CDLEntry>onload</td><tdclass=CDLDescription>Function to execute when the URL has been loaded.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getValue"></a>getValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getValue: function(</td><tdclass=PParameternowrap>array,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>defaultValue</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the value for the given key in the given associative array or the given default value if the value is null.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>array</td><tdclass=CDLDescription>Associative array that contains the value for the key.</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key whose value should be returned.</td></tr><tr><tdclass=CDLEntry>defaultValue</td><tdclass=CDLDescription>Value to be returned if the value for the given key is null.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getNumber"></a>getNumber</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getNumber: function(</td><tdclass=PParameternowrap>array,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>defaultValue</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the numeric value for the given key in the given associative array or the given default value (or 0) if the value is null. The value is converted to a numeric value using the Number function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>array</td><tdclass=CDLDescription>Associative array that contains the value for the key.</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key whose value should be returned.</td></tr><tr><tdclass=CDLEntry>defaultValue</td><tdclass=CDLDescription>Value to be returned if the value for the given key is null. Default is 0.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getColor"></a>getColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getColor: function(</td><tdclass=PParameternowrap>array,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>defaultValue</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the color value for the given key in the given associative array or the given default value if the value is null. If the value is <ahref="mxConstants-js.html#mxConstants.NONE"class=LVariableid=link130onMouseOver="ShowTip(event, 'tt107', 'link130')"onMouseOut="HideTip('tt107')">mxConstants.NONE</a> then null is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>array</td><tdclass=CDLDescription>Associative array that contains the value for the key.</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key whose value should be returned.</td></tr><tr><tdclass=CDLEntry>defaultValue</td><tdclass=CDLDescription>Value to be returned if the value for the given key is null. Default is null.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.clone"></a>clone</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>clone: function(</td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>transients,</td></tr><tr><td></td><tdclass=PParameternowrap>shallow</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Recursively clones the specified object ignoring all fieldnames in the given array of transient fields. <ahref="mxObjectIdentity-js.html#mxObjectIdentity.FIELD_NAME"class=LVariableid=link131onMouseOver="ShowTip(event, 'tt108', 'link131')"onMouseOut="HideTip('tt108')">mxObjectIdentity.FIELD_NAME</a> is always ignored by this function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>obj</td><tdclass=CDLDescription>Object to be cloned.</td></tr><tr><tdclass=CDLEntry>transients</td><tdclass=CDLDescription>Optional array of strings representing the fieldname to be ignored.</td></tr><tr><tdclass=CDLEntry>shallow</td><tdclass=CDLDescription>Optional boolean argument to specify if a shallow clone should be created, that is, one where all object references are not cloned or, in other words, one where only atomic (strings, numbers) values are cloned. Default is false.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.equalPoints"></a>equalPoints</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>equalPoints: function(</td><tdclass=PParameternowrap>a,</td></tr><tr><td></td><tdclass=PParameternowrap>b</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Compares all mxPoints in the given lists.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>a</td><tdclass=CDLDescription>Array of <ahref="mxPoint-js.html#mxPoint"class=LClassid=link132onMouseOver="ShowTip(event, 'tt62', 'link132')"onMouseOut="HideTip('tt62')">mxPoints</a> to be compared.</td></tr><tr><tdclass=CDLEntry>b</td><tdclass=CDLDescription>Array of <ahref="mxPoint-js.html#mxPoint"class=LClassid=link133onMouseOver="ShowTip(event, 'tt62', 'link133')"onMouseOut="HideTip('tt62')">mxPoints</a> to be compared.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.equalEntries"></a>equalEntries</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>equalEntries: function(</td><tdclass=PParameternowrap>a,</td></tr><tr><td></td><tdclass=PParameternowrap>b</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Compares all entries in the given dictionaries.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>a</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link134onMouseOver="ShowTip(event, 'tt92', 'link134')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be compared.</td></tr><tr><tdclass=CDLEntry>b</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link135onMouseOver="ShowTip(event, 'tt92', 'link135')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be compared.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.extend"></a>extend</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>extend: function(</td><tdclass=PParameternowrap>ctor,</td></tr><tr><td></td><tdclass=PParameternowrap>superCtor</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Assigns a copy of the superclass prototype to the subclass prototype. Note that this does not call the constructor of the superclass at this point, the superclass constructor should be called explicitely in the subclass constructor. Below is an example.</p><blockquote><preclass="prettyprint">MyGraph = function(container, model, renderHint, stylesheet)
mxUtils.extend(MyGraph, mxGraph);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>ctor</td><tdclass=CDLDescription>Constructor of the subclass.</td></tr><tr><tdclass=CDLEntry>superCtor</td><tdclass=CDLDescription>Constructor of the superclass.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.toString"></a>toString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>toString: function(</td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a textual representation of the specified object.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>obj</td><tdclass=CDLDescription>Object to return the string representation for.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.toRadians"></a>toRadians</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>toRadians: function(</td><tdclass=PParameternowrap>deg</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Converts the given degree to radians.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.arcToCurves"></a>arcToCurves</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>arcToCurves: function(</td><tdclass=PParameternowrap>x0,</td></tr><tr><td></td><tdclass=PParameternowrap>y0,</td></tr><tr><td></td><tdclass=PParameternowrap>r1,</td></tr><tr><td></td><tdclass=PParameternowrap>r2,</td></tr><tr><td></td><tdclass=PParameternowrap>angle,</td></tr><tr><td></td><tdclass=PParameternowrap>largeArcFlag,</td></tr><tr><td></td><tdclass=PParameternowrap>sweepFlag,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Converts the given arc to a series of curves.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getBoundingBox"></a>getBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getBoundingBox: function(</td><tdclass=PParameternowrap>rect,</td></tr><tr><td></td><tdclass=PParameternowrap>rotation</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the bounding box for the rotated rectangle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getRotatedPoint"></a>getRotatedPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getRotatedPoint: function(</td><tdclass=PParameternowrap>pt,</td></tr><tr><td></td><tdclass=PParameternowrap>cos,</td></tr><tr><td></td><tdclass=PParameternowrap>sin,</td></tr><tr><td></td><tdclass=PParameternowrap>c</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Rotates the given point by the given cos and sin.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.reversePortConstraints"></a>reversePortConstraints</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>reversePortConstraints: function(</td><tdclass=PParameternowrap>constraint</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Reverse the port constraint bitmask. For example, north | east becomes south | west</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.findNearestSegment"></a>findNearestSegment</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>findNearestSegment: function(</td><tdclass=PParameternowrap>state,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Finds the index of the nearest segment on the given cell state for the specified coordinate pair.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.rectangleIntersectsSegment"></a>rectangleIntersectsSegment</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>rectangleIntersectsSegment: function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>p1,</td></tr><tr><td></td><tdclass=PParameternowrap>p2</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given rectangle intersects the given segment.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>bounds</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link136onMouseOver="ShowTip(event, 'tt92', 'link136')"onMouseOut="HideTip('tt92')">mxRectangle</a> that represents the rectangle.</td></tr><tr><tdclass=CDLEntry>p1</td><tdclass=CDLDescription><ahref="mxPoint-js.html#mxPoint"class=LClassid=link137onMouseOver="ShowTip(event, 'tt62', 'link137')"onMouseOut="HideTip('tt62')">mxPoint</a> that represents the first point of the segment.</td></tr><tr><tdclass=CDLEntry>p2</td><tdclass=CDLDescription><ahref="mxPoint-js.html#mxPoint"class=LClassid=link138onMouseOver="ShowTip(event, 'tt62', 'link138')"onMouseOut="HideTip('tt62')">mxPoint</a> that represents the second point of the segment.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.contains"></a>contains</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>contains: function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the specified point (x, y) is contained in the given rectangle.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>bounds</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link139onMouseOver="ShowTip(event, 'tt92', 'link139')"onMouseOut="HideTip('tt92')">mxRectangle</a> that represents the area.</td></tr><tr><tdclass=CDLEntry>x</td><tdclass=CDLDescription>X-coordinate of the point.</td></tr><tr><tdclass=CDLEntry>y</td><tdclass=CDLDescription>Y-coordinate of the point.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.intersects"></a>intersects</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>intersects: function(</td><tdclass=PParameternowrap>a,</td></tr><tr><td></td><tdclass=PParameternowrap>b</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the two rectangles intersect.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>a</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link140onMouseOver="ShowTip(event, 'tt92', 'link140')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be checked for intersection.</td></tr><tr><tdclass=CDLEntry>b</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link141onMouseOver="ShowTip(event, 'tt92', 'link141')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be checked for intersection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.intersects"></a>intersects</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>intersectsHotspot: function(</td><tdclass=PParameternowrap>state,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>hotspot,</td></tr><tr><td></td><tdclass=PParameternowrap>min,</td></tr><tr><td></td><tdclass=PParameternowrap>max</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the two rectangles intersect.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>a</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link142onMouseOver="ShowTip(event, 'tt92', 'link142')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be checked for intersection.</td></tr><tr><tdclass=CDLEntry>b</td><tdclass=CDLDescription><ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link143onMouseOver="ShowTip(event, 'tt92', 'link143')"onMouseOut="HideTip('tt92')">mxRectangle</a> to be checked for intersection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getOffset"></a>getOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getOffset: function(</td><tdclass=PParameternowrap>container,</td></tr><tr><td></td><tdclass=PParameternowrap>scrollOffset</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the offset for the specified container as an <ahref="mxPoint-js.html#mxPoint"class=LClassid=link144onMouseOver="ShowTip(event, 'tt62', 'link144')"onMouseOut="HideTip('tt62')">mxPoint</a>. The offset is the distance from the top left corner of the container to the top left corner of the document.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node to return the offset for.</td></tr><tr><tdclass=CDLEntry>scollOffset</td><tdclass=CDLDescription>Optional boolean to add the scroll offset of the document. Default is false.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getScrollOrigin"></a>getScrollOrigin</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getScrollOrigin: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the top, left corner of the viewrect as an <ahref="mxPoint-js.html#mxPoint"class=LClassid=link145onMouseOver="ShowTip(event, 'tt62', 'link145')"onMouseOut="HideTip('tt62')">mxPoint</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.convertPoint"></a>convertPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>convertPoint: function(</td><tdclass=PParameternowrap>container,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Converts the specified point (x, y) using the offset of the specified container and returns a new <ahref="mxPoint-js.html#mxPoint"class=LClassid=link146onMouseOver="ShowTip(event, 'tt62', 'link146')"onMouseOut="HideTip('tt62')">mxPoint</a> with the result.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node to use for the offset.</td></tr><tr><tdclass=CDLEntry>x</td><tdclass=CDLDescription>X-coordinate of the point to be converted.</td></tr><tr><tdclass=CDLEntry>y</td><tdclass=CDLDescription>Y-coordinate of the point to be converted.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.ltrim"></a>ltrim</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>ltrim: function(</td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>chars</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Strips all whitespaces from the beginning of the string. Without the second parameter, Javascript function will trim these characters:</p><ul><li>”“ (ASCII 32 (0x20)), an ordinary space</li><li>”\t” (ASCII 9 (0x09)), a tab</li><li>”\n” (ASCII 10 (0x0A)), a new line (line feed)</li><li>”\r” (ASCII 13 (0x0D)), a carriage return</li><li>”\0” (ASCII 0 (0x00)), the NUL-byte</li><li>”\x0B” (ASCII 11 (0x0B)), a vertical tab</li></ul></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.rtrim"></a>rtrim</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>rtrim: function(</td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>chars</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Strips all whitespaces from the end of the string. Without the second parameter, Javascript function will trim these characters:</p><ul><li>”“ (ASCII 32 (0x20)), an ordinary space</li><li>”\t” (ASCII 9 (0x09)), a tab</li><li>”\n” (ASCII 10 (0x0A)), a new line (line feed)</li><li>”\r” (ASCII 13 (0x0D)), a carriage return</li><li>”\0” (ASCII 0 (0x00)), the NUL-byte</li><li>”\x0B” (ASCII 11 (0x0B)), a vertical tab</li></ul></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.trim"></a>trim</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>trim: function(</td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>chars</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Strips all whitespaces from both end of the string. Without the second parameter, Javascript function will trim these characters:</p><ul><li>”“ (ASCII 32 (0x20)), an ordinary space</li><li>”\t” (ASCII 9 (0x09)), a tab</li><li>”\n” (ASCII 10 (0x0A)), a new line (line feed)</li><li>”\r” (ASCII 13 (0x0D)), a carriage return</li><li>”\0” (ASCII 0 (0x00)), the NUL-byte</li><li>”\x0B” (ASCII 11 (0x0B)), a vertical tab</li></ul></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.isNumeric"></a>isNumeric</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>isNumeric: function(</td><tdclass=PParameternowrap>str</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the specified value is numeric, that is, if it is not null, not an empty string, not a HEX number and isNaN returns false.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>str</td><tdclass=CDLDescription>String representing the possibly numeric value.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.mod"></a>mod</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mod: function(</td><tdclass=PParameternowrap>n,</td></tr><tr><td></td><tdclass=PParameternowrap>m</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the remainder of division of n by m. You should use this instead of the built-in operation as the built-in operation does not properly handle negative numbers.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.intersection"></a>intersection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>intersection: function (</td><tdclass=PParameternowrap>x0,</td></tr><tr><td></td><tdclass=PParameternowrap>y0,</td></tr><tr><td></td><tdclass=PParameternowrap>x1,</td></tr><tr><td></td><tdclass=PParameternowrap>y1,</td></tr><tr><td></td><tdclass=PParameternowrap>x2,</td></tr><tr><td></td><tdclass=PParameternowrap>y2,</td></tr><tr><td></td><tdclass=PParameternowrap>x3,</td></tr><tr><td></td><tdclass=PParameternowrap>y3</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the intersection of two lines as an <ahref="mxPoint-js.html#mxPoint"class=LClassid=link147onMouseOver="ShowTip(event, 'tt62', 'link147')"onMouseOut="HideTip('tt62')">mxPoint</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>x0</td><tdclass=CDLDescription>X-coordinate of the first line’s startpoint.</td></tr><tr><tdclass=CDLEntry>y0</td><tdclass=CDLDescription>X-coordinate of the first line’s startpoint.</td></tr><tr><tdclass=CDLEntry>x1</td><tdclass=CDLDescription>X-coordinate of the first line’s endpoint.</td></tr><tr><tdclass=CDLEntry>y1</td><tdclass=CDLDescription>Y-coordinate of the first line’s endpoint.</td></tr><tr><tdclass=CDLEntry>x2</td><tdclass=CDLDescription>X-coordinate of the second line’s startpoint.</td></tr><tr><tdclass=CDLEntry>y2</td><tdclass=CDLDescription>Y-coordinate of the second line’s startpoint.</td></tr><tr><tdclass=CDLEntry>x3</td><tdclass=CDLDescription>X-coordinate of the second line’s endpoint.</td></tr><tr><tdclass=CDLEntry>y3</td><tdclass=CDLDescription>Y-coordinate of the second line’s endpoint.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.ptSeqDistSq"></a>ptSeqDistSq</h3><divclass=CBody><p>Returns the square distance between a segment and a point.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>x1</td><tdclass=CDLDescription>X-coordinate of the startpoint of the segment.</td></tr><tr><tdclass=CDLEntry>y1</td><tdclass=CDLDescription>Y-coordinate of the startpoint of the segment.</td></tr><tr><tdclass=CDLEntry>x2</td><tdclass=CDLDescription>X-coordinate of the endpoint of the segment.</td></tr><tr><tdclass=CDLEntry>y2</td><tdclass=CDLDescription>Y-coordinate of the endpoint of the segment.</td></tr><tr><tdclass=CDLEntry>px</td><tdclass=CDLDescription>X-coordinate of the point.</td></tr><tr><tdclass=CDLEntry>py</td><tdclass=CDLDescription>Y-coordinate of the point.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.relativeCcw"></a>relativeCcw</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>relativeCcw: function(</td><tdclass=PParameternowrap>x1,</td></tr><tr><td></td><tdclass=PParameternowrap>y1,</td></tr><tr><td></td><tdclass=PParameternowrap>x2,</td></tr><tr><td></td><tdclass=PParameternowrap>y2,</td></tr><tr><td></td><tdclass=PParameternowrap>px,</td></tr><tr><td></td><tdclass=PParameternowrap>py</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns 1 if the given point on the right side of the segment, 0 if its on the segment, and -1 if the point is on the left side of the segment.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>x1</td><tdclass=CDLDescription>X-coordinate of the startpoint of the segment.</td></tr><tr><tdclass=CDLEntry>y1</td><tdclass=CDLDescription>Y-coordinate of the startpoint of the segment.</td></tr><tr><tdclass=CDLEntry>x2</td><tdclass=CDLDescription>X-coordinate of the endpoint of the segment.</td></tr><tr><tdclass=CDLEntry>y2</td><tdclass=CDLDescription>Y-coordinate of the endpoint of the segment.</td></tr><tr><tdclass=CDLEntry>px</td><tdclass=CDLDescription>X-coordinate of the point.</td></tr><tr><tdclass=CDLEntry>py</td><tdclass=CDLDescription>Y-coordinate of the point.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.animateChanges"></a>animateChanges</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>animateChanges: function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>changes</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>See <ahref="mxEffects-js.html#mxEffects.animateChanges"class=LFunctionid=link148onMouseOver="ShowTip(event, 'tt73', 'link148')"onMouseOut="HideTip('tt73')">mxEffects.animateChanges</a>. This is for backwards compatibility and will be removed later.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.cascadeOpacity"></a>cascadeOpacity</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>cascadeOpacity: function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>cell,</td></tr><tr><td></td><tdclass=PParameternowrap>opacity</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>See <ahref="mxEffects-js.html#mxEffects.cascadeOpacity"class=LFunctionid=link149onMouseOver="ShowTip(event, 'tt75', 'link149')"onMouseOut="HideTip('tt75')">mxEffects.cascadeOpacity</a>. This is for backwards compatibility and will be removed later.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.fadeOut"></a>fadeOut</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>fadeOut: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>from,</td></tr><tr><td></td><tdclass=PParameternowrap>remove,</td></tr><tr><td></td><tdclass=PParameternowrap>step,</td></tr><tr><td></td><tdclass=PParameternowrap>delay,</td></tr><tr><td></td><tdclass=PParameternowrap>isEnabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>See <ahref="mxEffects-js.html#mxEffects.fadeOut"class=LFunctionid=link150onMouseOver="ShowTip(event, 'tt77', 'link150')"onMouseOut="HideTip('tt77')">mxEffects.fadeOut</a>. This is for backwards compatibility and will be removed later.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.setOpacity"></a>setOpacity</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setOpacity: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the opacity of the specified DOM node to the given value in %.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>DOM node to set the opacity for.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Opacity in %. Possible values are between 0 and 100.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.createImage"></a>createImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>createImage: function(</td><tdclass=PParameternowrap>src</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns an image (IMG node) or VML image (v:image) in IE6 in quirks mode.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>src</td><tdclass=CDLDescription>URL that points to the image to be displayed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.sortCells"></a>sortCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>sortCells: function(</td><tdclass=PParameternowrap>cells,</td></tr><tr><td></td><tdclass=PParameternowrap>ascending</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sorts the given cells according to the order in the cell hierarchy. Ascending is optional and defaults to true.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getStylename"></a>getStylename</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getStylename: function(</td><tdclass=PParameternowrap>style</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the stylename in a style of the form [(stylename|key=value);] or an empty string if the given style does not contain a stylename.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>String of the form [(stylename|key=value);].</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getStylenames"></a>getStylenames</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getStylenames: function(</td><tdclass=PParameternowrap>style</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the stylenames in a style of the form [(stylename|key=value);] or an empty array if the given style does not contain any stylenames.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>String of the form [(stylename|key=value);].</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.indexOfStylename"></a>indexOfStylename</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>indexOfStylename: function(</td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>stylename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the index of the given stylename in the given style. This returns -1 if the given stylename does not occur (as a stylename) in the given style, otherwise it returns the index of the first character.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.addStylename"></a>addStylename</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>addStylename: function(</td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>stylename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified stylename to the given style if it does not already contain the stylename.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.removeStylename"></a>removeStylename</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>removeStylename: function(</td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>stylename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes all occurrences of the specified stylename in the given style and returns the updated style. Trailing semicolons are not preserved.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.removeAllStylenames"></a>removeAllStylenames</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>removeAllStylenames: function(</td><tdclass=PParameternowrap>style</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes all stylenames from the given style and returns the updated style.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.setCellStyles"></a>setCellStyles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setCellStyles: function(</td><tdclass=PParameternowrap>model,</td></tr><tr><td></td><tdclass=PParameternowrap>cells,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Assigns the value for the given key in the styles of the given cells, or removes the key from the styles if the value is null.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>model</td><tdclass=CDLDescription><ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link151onMouseOver="ShowTip(event, 'tt109', 'link151')"onMouseOut="HideTip('tt109')">mxGraphModel</a> to execute the transaction in.</td></tr><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link152onMouseOver="ShowTip(event, 'tt110', 'link152')"onMouseOut="HideTip('tt110')">mxCells</a> to be updated.</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key of the style to be changed.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>New value for the given key.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.setStyle"></a>setStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setStyle: function(</td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds or removes the given key, value pair to the style and returns the new style. If value is null or zero length then the key is removed from the style. This is for cell styles, not for CSS styles.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>String of the form [(stylename|key=value);].</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key of the style to be changed.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>New value for the given key.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.setCellStyleFlags"></a>setCellStyleFlags</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setCellStyleFlags: function(</td><tdclass=PParameternowrap>model,</td></tr><tr><td></td><tdclass=PParameternowrap>cells,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>flag,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets or toggles the flag bit for the given key in the cell’s styles. If value is null then the flag is toggled.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var cells = graph.getSelectionCells();
mxUtils.setCellStyleFlags(graph.model,
cells,
mxConstants.STYLE_FONTSTYLE,
mxConstants.FONT_BOLD);</pre></blockquote><p>Toggles the bold font style.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>model</td><tdclass=CDLDescription><ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link153onMouseOver="ShowTip(event, 'tt109', 'link153')"onMouseOut="HideTip('tt109')">mxGraphModel</a> that contains the cells.</td></tr><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link154onMouseOver="ShowTip(event, 'tt110', 'link154')"onMouseOut="HideTip('tt110')">mxCells</a> to change the style for.</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key of the style to be changed.</td></tr><tr><tdclass=CDLEntry>flag</td><tdclass=CDLDescription>Integer for the bit to be changed.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Optional boolean value for the flag.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.setStyleFlag"></a>setStyleFlag</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>setStyleFlag: function(</td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>flag,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets or removes the given key from the specified style and returns the new style. If value is null then the flag is toggled.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>String of the form [(stylename|key=value);].</td></tr><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key of the style to be changed.</td></tr><tr><tdclass=CDLEntry>flag</td><tdclass=CDLDescription>Integer for the bit to be changed.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Optional boolean value for the given flag.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getSizeForString"></a>getSizeForString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getSizeForString: function(</td><tdclass=PParameternowrap>text,</td></tr><tr><td></td><tdclass=PParameternowrap>fontSize,</td></tr><tr><td></td><tdclass=PParameternowrap>fontFamily,</td></tr><tr><td></td><tdclass=PParameternowrap>textWidth</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an <ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link155onMouseOver="ShowTip(event, 'tt92', 'link155')"onMouseOut="HideTip('tt92')">mxRectangle</a> with the size (width and height in pixels) of the given string. The string may contain HTML markup. Newlines should be converted to <ahref="#mxUtils.br"class=LFunctionid=link156onMouseOver="ShowTip(event, 'tt26', 'link156')"onMouseOut="HideTip('tt26')">br</a> before calling this method.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var label = graph.getLabel(cell).replace(/\n/g, "<br>");
var size = graph.getSizeForString(label);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>String whose size should be returned.</td></tr><tr><tdclass=CDLEntry>fontSize</td><tdclass=CDLDescription>Integer that specifies the font size in pixels. Default is <ahref="mxConstants-js.html#mxConstants.DEFAULT_FONTSIZE"class=LVariableid=link157onMouseOver="ShowTip(event, 'tt111', 'link157')"onMouseOut="HideTip('tt111')">mxConstants.DEFAULT_FONTSIZE</a>.</td></tr><tr><tdclass=CDLEntry>fontFamily</td><tdclass=CDLDescription>String that specifies the name of the font family. Default is <ahref="mxConstants-js.html#mxConstants.DEFAULT_FONTFAMILY"class=LVariableid=link158onMouseOver="ShowTip(event, 'tt112', 'link158')"onMouseOut="HideTip('tt112')">mxConstants.DEFAULT_FONTFAMILY</a>.</td></tr><tr><tdclass=CDLEntry>textWidth</td><tdclass=CDLDescription>Optional width for text wrapping.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.getScaleForPageCount"></a>getScaleForPageCount</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getScaleForPageCount: function(</td><tdclass=PParameternowrap>pageCount,</td></tr><tr><td></td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>pageFormat,</td></tr><tr><td></td><tdclass=PParameternowrap>border</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the scale to be used for printing the graph with the given bounds across the specifies number of pages with the given format. The scale is always computed such that it given the given amount or fewer pages in the print output. See <ahref="../view/mxPrintPreview-js.html#mxPrintPreview"class=LClassid=link159onMouseOver="ShowTip(event, 'tt113', 'link159')"onMouseOut="HideTip('tt113')">mxPrintPreview</a> for an example.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>pageCount</td><tdclass=CDLDescription>Specifies the number of pages in the print output.</td></tr><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription><ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link160onMouseOver="ShowTip(event, 'tt104', 'link160')"onMouseOut="HideTip('tt104')">mxGraph</a> that should be printed.</td></tr><tr><tdclass=CDLEntry>pageFormat</td><tdclass=CDLDescription>Optional <ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link161onMouseOver="ShowTip(event, 'tt92', 'link161')"onMouseOut="HideTip('tt92')">mxRectangle</a> that specifies the page format. Default is <ahref="mxConstants-js.html#mxConstants.PAGE_FORMAT_A4_PORTRAIT"class=LVariableid=link162onMouseOver="ShowTip(event, 'tt114', 'link162')"onMouseOut="HideTip('tt114')">mxConstants.PAGE_FORMAT_A4_PORTRAIT</a>.</td></tr><tr><tdclass=CDLEntry>border</td><tdclass=CDLDescription>The border along each side of every page.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>show: function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>doc,</td></tr><tr><td></td><tdclass=PParameternowrap>x0,</td></tr><tr><td></td><tdclass=PParameternowrap>y0</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Copies the styles and the markup from the graph’s container into the given document and removes all cursor styles. The document is returned.</p><p>This function should be called from within the document with the graph. If you experience problems with missing stylesheets in IE then try adding the domain to the trusted sites.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription><ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link163onMouseOver="ShowTip(event, 'tt104', 'link163')"onMouseOut="HideTip('tt104')">mxGraph</a> to be copied.</td></tr><tr><tdclass=CDLEntry>doc</td><tdclass=CDLDescription>Document where the new graph is created.</td></tr><tr><tdclass=CDLEntry>x0</td><tdclass=CDLDescription>X-coordinate of the graph view origin. Default is 0.</td></tr><tr><tdclass=CDLEntry>y0</td><tdclass=CDLDescription>Y-coordinate of the graph view origin. Default is 0.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.printScreen"></a>printScreen</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>printScreen: function(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Prints the specified graph using a new window and the built-in print dialog.</p><p>This function should be called from within the document with the graph.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription><ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link164onMouseOver="ShowTip(event, 'tt104', 'link164')"onMouseOut="HideTip('tt104')">mxGraph</a> to be printed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.popup"></a>popup</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>popup: function(</td><tdclass=PParameternowrap>content,</td></tr><tr><td></td><tdclass=PParameternowrap>isInternalWindow</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows the specified text content in a new <ahref="mxWindow-js.html#mxWindow"class=LClassid=link165onMouseOver="ShowTip(event, 'tt98', 'link165')"onMouseOut="HideTip('tt98')">mxWindow</a> or a new browser window if isInternalWindow is false.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>content</td><tdclass=CDLDescription>String that specifies the text to be displayed.</td></tr><tr><tdclass=CDLEntry>isInternalWindow</td><tdclass=CDLDescription>Optional boolean indicating if an mxWindow should be used instead of a new browser window. Default is false.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.alert"></a>alert</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>alert: function(</td><tdclass=PParameternowrap>message</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Displayss the given alert in a new dialog. This implementation uses the built-in alert function. This is used to display validation errors when connections cannot be changed or created.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>message</td><tdclass=CDLDescription>String specifying the message to be displayed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.prompt"></a>prompt</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>prompt: function(</td><tdclass=PParameternowrap>message,</td></tr><tr><td></td><tdclass=PParameternowrap>defaultValue</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Displays the given message in a prompt dialog. This implementation uses the built-in prompt function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>message</td><tdclass=CDLDescription>String specifying the message to be displayed.</td></tr><tr><tdclass=CDLEntry>defaultValue</td><tdclass=CDLDescription>Optional string specifying the default value.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.confirm"></a>confirm</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>confirm: function(</td><tdclass=PParameternowrap>message</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Displays the given message in a confirm dialog. This implementation uses the built-in confirm function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>message</td><tdclass=CDLDescription>String specifying the message to be displayed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.error"></a>error</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>error: function(</td><tdclass=PParameternowrap>message,</td></tr><tr><td></td><tdclass=PParameternowrap>width,</td></tr><tr><td></td><tdclass=PParameternowrap>close,</td></tr><tr><td></td><tdclass=PParameternowrap>icon</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Displays the given error message in a new <ahref="mxWindow-js.html#mxWindow"class=LClassid=link166onMouseOver="ShowTip(event, 'tt98', 'link166')"onMouseOut="HideTip('tt98')">mxWindow</a> of the given width. If close is true then an additional close button is added to the window. The optional icon specifies the icon to be used for the window. Default is <ahref="#mxUtils.errorImage"class=LVariableid=link167onMouseOver="ShowTip(event, 'tt115', 'link167')"onMouseOut="HideTip('tt115')">mxUtils.errorImage</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>message</td><tdclass=CDLDescription>String specifying the message to be displayed.</td></tr><tr><tdclass=CDLEntry>width</td><tdclass=CDLDescription>Integer specifying the width of the window.</td></tr><tr><tdclass=CDLEntry>close</td><tdclass=CDLDescription>Optional boolean indicating whether to add a close button.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>Optional icon for the window decoration.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxUtils.makeDraggable"></a>makeDraggable</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>makeDraggable: function(</td><tdclass=PParameternowrap>element,</td></tr><tr><td></td><tdclass=PParameternowrap>graphF,</td></tr><tr><td></td><tdclass=PParameternowrap>funct,</td></tr><tr><td></td><tdclass=PParameternowrap>dragElement,</td></tr><tr><td></td><tdclass=PParameternowrap>dx,</td></tr><tr><td></td><tdclass=PParameternowrap>dy,</td></tr><tr><td></td><tdclass=PParameternowrap>autoscroll,</td></tr><tr><td></td><tdclass=PParameternowrap>scalePreview,</td></tr><tr><td></td><tdclass=PParameternowrap>highlightDropTargets,</td></tr><tr><td></td><tdclass=PParameternowrap>getDropTarget</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Configures the given DOM element to act as a drag source for the specified graph. Returns a a new <ahref="mxDragSource-js.html#mxDragSource"class=LClassid=link168onMouseOver="ShowTip(event, 'tt116', 'link168')"onMouseOut="HideTip('tt116')">mxDragSource</a>. If <mxDragSource.guideEnabled> is enabled then the x and y arguments must be used in funct to match the preview location.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var funct = function(graph, evt, cell, x, y)
{
if (graph.canImportCell(cell))
{
var parent = graph.getDefaultParent();
var vertex = null;
graph.getModel().beginUpdate();
try
{
vertex = graph.insertVertex(parent, null, 'Hello', x, y, 80, 30);
document.body.appendChild(img);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>element</td><tdclass=CDLDescription>DOM element to make draggable.</td></tr><tr><tdclass=CDLEntry>graphF</td><tdclass=CDLDescription><ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link169onMouseOver="ShowTip(event, 'tt104', 'link169')"onMouseOut="HideTip('tt104')">mxGraph</a> that acts as the drop target or a function that takes a mouse event and returns the current <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link170onMouseOver="ShowTip(event, 'tt104', 'link170')"onMouseOut="HideTip('tt104')">mxGraph</a>.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Function to execute on a successful drop.</td></tr><tr><tdclass=CDLEntry>dragElement</td><tdclass=CDLDescription>Optional DOM node to be used for the drag preview.</td></tr><tr><tdclass=CDLEntry>dx</td><tdclass=CDLDescription>Optional horizontal offset between the cursor and the drag preview.</td></tr><tr><tdclass=CDLEntry>dy</td><tdclass=CDLDescription>Optional vertical offset between the cursor and the drag preview.</td></tr><tr><tdclass=CDLEntry>autoscroll</td><tdclass=CDLDescription>Optional boolean that specifies if autoscroll should be used. Default is mxGraph.autoscroll.</td></tr><tr><tdclass=CDLEntry>scalePreview</td><tdclass=CDLDescription>Optional boolean that specifies if the preview element should be scaled according to the graph scale. If this is true, then the offsets will also be scaled. Default is false.</td></tr><tr><tdclass=CDLEntry>highlightDropTargets</td><tdclass=CDLDescription>Optional boolean that specifies if dropTargets should be highlighted. Default is true.</td></tr><tr><tdclass=CDLEntry>getDropTarget</td><tdclass=CDLDescription>Optional function to return the drop target for a given location (x, y). Default is mxGraph.getCellAt.</td></tr></table></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>removeCursors: function(</td><tdclass=PParameternowrap>element</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Removes the cursors from the style of the given DOM node and its descendants.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>repaintGraph: function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>pt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Normally not required, this contains the code to workaround a repaint issue and force a repaint of the graph container in AppleWebKit.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>getCurrentStyle: function()</td></tr></table></blockquote>Returns the current style of the specified element.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>hasScrollbars: function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns true if the overflow CSS property of the given node is either scroll or auto.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>bind: function(</td><tdclass=PParameternowrap>scope,</td></tr><tr><td></td><tdclass=PParameternowrap>funct</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns a wrapper function that locks the execution scope of the given function to the specified scope. </div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>eval: function(</td><tdclass=PParameternowrap>expr</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Evaluates the given expression using eval and returns the JavaScript object that represents the expression result. </div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>findNode: function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the first node where attr equals value. </div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>findNodeByAttribute: function()</td></tr></table></blockquote>Returns the first node where the given attribute matches the given value.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>getFunctionName: function(</td><tdclass=PParameternowrap>f</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the name for the given function.</div></div><divclas