<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>addCommandToHistory = c.undoCmd.add = function(</td><tdclass=PParameternowrap>cmd</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Adds a command object to the undo history stack</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.addExtension = function(</td><tdclass=PParameternowrap>name,</td></tr><tr><td></td><tdclass=PParameternowrap>ext_func</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Add an extension to the editor</div></div><divclass=CToolTipid="tt3"><divclass=CFunction>Adds a given command to the history stack</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var addSvgElementFromJson = this.addSvgElementFromJson = function(</td><tdclass=PParameternowrap>data</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Create a new SVG element based on the given object keys/values and add it to the current layer The element will be ran through cleanupElement before being returned</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var addToSelection = this.addToSelection = function(</td><tdclass=PParameternowrap>elemsToAdd,</td></tr><tr><td></td><tdclass=PParameternowrap>showGrips</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Adds a list of elements to the selection. </div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.alignSelectedElements = function(</td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PParameternowrap>relative_to</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Aligns selected elements</div></div><divclass=CToolTipid="tt7"><divclass=CFunction>Runs “apply” on all subcommands</div></div><divclass=CToolTipid="tt8"><divclass=CFunction>Performs the stored change action</div></div><divclass=CToolTipid="tt9"><divclass=CFunction>Re-Inserts the new element</div></div><divclass=CToolTipid="tt10"><divclass=CFunction>Re-removes the new element</div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var assignAttributes = this.assignAttributes = function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>attrs,</td></tr><tr><td></td><tdclass=PParameternowrap>suspendLength,</td></tr><tr><td></td><tdclass=PParameternowrap>unitCheck</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Assigns multiple attributes to an element.</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var BatchCommand = this.undoCmd.batch = function(</td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>History command that can contain/execute multiple other commands</div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>c.beginUndoableChange = function(</td><tdclass=PParameternowrap>attrName,</td></tr><tr><td></td><tdclass=PParameternowrap>elems</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>This function tells the canvas to remember the old values of the attrName attribute for each element sent in. </div></div><divclass=CToolTipid="tt14"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>c.bind = function(</td><tdclass=PParameternowrap>event,</td></tr><tr><td></td><tdclass=PParameternowrap>f</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Attaches a callback function to an event</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt15"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var ChangeElementCommand = this.undoCmd.changeElement = function(</td><tdclass=PParameternowrap>elem,</td></tr><tr><td></td><tdclass=PParameternowrap>attrs,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>History command to make a change to an element. </div></div><divclass=CToolTipid="tt16"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var changeSelectedAttribute = this.changeSelectedAttribute = function(</td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>val,</td></tr><tr><td></td><tdclass=PParameternowrap>elems</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Change the given/selected element and add the original value to the history stack If you want to change all selectedElements, ignore the elems argument. </div></div><divclass=CToolTipid="tt17"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var changeSelectedAttributeNoUndo = function(</td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>newValue,</td></tr><tr><td></td><tdclass=PParameternowrap>elems</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>This function makes the changes to the elements. </div></div><divclass=CToolTipid="tt18"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var cleanupElement = this.cleanupElement = function(</td><tdclass=PParameternowrap>element</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Remove unneeded (default) attributes, makes resulting SVG smaller</div></div><divclass=CToolTipid="tt19"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.clear = function()</td></tr></table></blockquote>Clears the current document. </div></div><divclass=CToolTipid="tt20"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var clearSelection = this.clearSelection = function(</td><tdclass=PParameternowrap>noCall</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Clears the selection. </div></div><divclass=CToolTipid="tt21"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.cloneSelectedElements = function()</td></tr></table></blockquote>Create deep DOM copies (clones) of all selected elements and move them slightly from their originals</div></div><divclass=CToolTipid="tt22"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>convertToNum = function(</td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>val</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Converts given values to numbers. </div></div><divclass=CToolTipid="tt23"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.convertToPath = function(</td><tdclass=PParameternowrap>elem,</td></tr><tr><td></td><tdclass=PParameternowrap>getBBox</td><tdclass=PAfterPa
<divclass=CToolTipid="tt28"><divclass=CFunction>Converts a string from base64</div></div><divclass=CToolTipid="tt29"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.deleteCurrentLayer = function()</td></tr></table></blockquote>Deletes the current layer from the drawing and then clears the selection. </div></div><divclass=CToolTipid="tt30"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.deleteSelectedElements = function()</td></tr></table></blockquote>Removes all selected elements from the DOM and adds the change to the history stack</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt31"><divclass=CFunction>Iterate through all our subcommands and returns all the elements we are changing</div></div><divclass=CToolTipid="tt32"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt33"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt34"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt35"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt36"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.embedImage = function(</td><tdclass=PParameternowrap>val,</td></tr><tr><td></td><tdclass=PParameternowrap>callback</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Converts a given image file to a data URL when possible, then runs a given callback</div></div><divclass=CToolTipid="tt37"><divclass=CFunction>Converts a string to base64</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt38"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var ffClone = function(</td><tdclass=PParameternowrap>elem</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Hack for Firefox bugs where text element features aren’t updated. </div></div><divclass=CToolTipid="tt39"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>var findDefs = function()</td></tr></table></blockquote>Return the document’s defs element, create it first if necessary</div></div><divclass=CToolTipid="tt40"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var findDuplicateGradient = function(</td><tdclass=PParameternowrap>grad</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Check if exact gradient already exists</div></div><divclass=CToolTipid="tt41"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>c.finishUndoableChange = function()</td></tr></table></blockquote>This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called. </div></div><divclass=CToolTipid="tt42"><divclass=CFunction>Converts XML entities in a string to single characters. </div></div><!--END_ND_TOOLTIPS-->