<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>Adds a given command to the history stack</div></div><divclass=CToolTipid="tt3"><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="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>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="tt5"><divclass=CFunction>Runs “apply” on all subcommands</div></div><divclass=CToolTipid="tt6"><divclass=CFunction>Performs the stored change action</div></div><divclass=CToolTipid="tt7"><divclass=CFunction>Re-Inserts the new element</div></div><divclass=CToolTipid="tt8"><divclass=CFunction>Re-removes the new element</div></div><divclass=CToolTipid="tt9"><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="tt10"><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="tt11"><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="tt12"><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="tt13"><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="tt14"><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="tt15"><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="tt16"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.clearSelection = function(</td><tdclass=PParameternowrap>noCall</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Clears the selection. </div></div><divclass=CToolTipid="tt17"><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="tt18"><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=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Convert selected element to a path, or get the BBox of an element-as-path</div></div><divclass=CToolTipid="tt19"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.createLayer = function(</td><tdclass=PParameternowrap>name</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Creates a new top-level layer in the drawing with the given name, sets the current layer to it, and then clears the selection This function then calls the ‘changed’ handler. </div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt20"><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><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt21"><divclass=CFunction>Iterate through all our subcommands and returns all the elements we are changing</div></div><divclass=CToolTipid="tt22"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt23"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt24"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt25"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt26"><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><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt27"><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="tt28"><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="tt29"><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="tt30"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>fromXml = function(</td><tdclass=PParameternowrap>str</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Converts XML entities in a string to single characters. </div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt31"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.getColor = function(</td><tdclass=PParameternowrap>type</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the current fill/stroke option</div></div><divclass=CToolTipid="tt32"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getContentElem = function()</td></tr></table></blockquote>Returns the content DOM element</div></div><divclass=CToolTipid="tt33"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getCurrentLayer = function()</td></tr></table></blockquote>Returns the name of the currently selected layer. </div></div><divclass=CToolTipid="tt34"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getDocumentTitle = function()</td></tr></table></blockquote>Returns the current document title or an empty string if not found</div></div><divclass=CToolTipid="tt35"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.getEditorNS = function(</td><tdclass=PParameternowrap>add</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the editor’s namespace URL, optionally adds it to root element</div></div><divclass=CToolTipid="tt36"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>getId = c.getId = function()</td></tr></table></blockquote>Returns the last created DOM element ID string</div></div><divclass=CToolTipid="tt37"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.getLayer = function(</td><tdclass=PParameternowrap>i</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the name of the ith layer. </div></div><divclass=CToolTipid="tt38"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.getLayerOpacity = function(</td><tdclass=PParameternowrap>layername</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the opacity of the given layer. </div></div><divclass=CToolTipid="tt39"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.getLayerVisibility = function(</td><tdclass=PParameternowrap>layername</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns whether the layer is visible. </div></div><divclass=CToolTipid="tt40"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var getMatrix = function(</td><tdclass=PParameternowrap>elem</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Get the matrix object for a given element</div></div><divclass=CToolTipid="tt41"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getMode = function()</td></tr></table></blockquote>Returns the current editor mode string</div></div><divclass=CToolTipid="tt42"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var getMouseTarget = this.getMouseTarget = function(</td><tdclass=PPara
<divclass=CToolTipid="tt60"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var hasMatrixTransform = this.hasMatrixTransform = function(</td><tdclass=PParameternowrap>tlist</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>See if the given transformlist includes a non-indentity matrix transform</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt61"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>var identifyLayers = function()</td></tr></table></blockquote>Updates layer system</div></div><divclass=CToolTipid="tt62"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.importSvgString = function(</td><tdclass=PParameternowrap>xmlString</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>This function imports the input SVG XML into the current layer in the drawing</div></div><divclass=CToolTipid="tt63"><divclass=CFunction>Resets the parent selector group element</div></div><divclass=CToolTipid="tt64"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var InsertElementCommand = this.undoCmd.insertElement = function(</td><tdclass=PParameternowrap>elem,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>History command for an element that was added to the DOM</div></div><divclass=CToolTipid="tt65"><divclass=CFunction>Returns a boolean indicating whether or not the batch command is empty</div></div><divclass=CToolTipid="tt66"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var isIdentity = function(</td><tdclass=PParameternowrap>m</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Helper function to check if the matrix performs no actual transform (i.e. </div></div><divclass=CToolTipid="tt67"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>canvas.isValidUnit = function(</td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>val</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Check if an attribute’s value is in a valid format</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt69"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>var matrixMultiply = this.matrixMultiply = function()</td></tr></table></blockquote>This function tries to return a SVGMatrix that is the multiplication m1*m2. </div></div><divclass=CToolTipid="tt70"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var MoveElementCommand = this.undoCmd.moveElement = function(</td><tdclass=PParameternowrap>elem,</td></tr><tr><td></td><tdclass=PParameternowrap>oldNextSibling,</td></tr><tr><td></td><tdclass=PParameternowrap>oldParent,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>History command for an element that had its DOM position changed</div></div><divclass=CToolTipid="tt71"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.moveSelectedToLayer = function(</td><tdclass=PParameternowrap>layername</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Moves the selected elements to layername. </div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt73"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.rasterExport = function()</td></tr></table></blockquote>Generates a PNG Data URL based on the current image, then calls “exported” with an object including the string and any issues found</div></div><divclass=CToolTipid="tt74"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>var recalculateAllSelectedDimensions = this.recalculateAllSelectedDimensions = function()</td></tr></table></blockquote>Runs recalculateDimensions on the selected elements, adding the changes to a single batch command</div></div><divclass=CToolTipid="tt75"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var recalculateDimensions = this.recalculateDimensions = function(</td><tdclass=PParameternowrap>selected</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Decides the course of action based on the element’s transform list</div></div><divclass=CToolTipid="tt76"><divclass=CFunction>Performs a redo step</div></div><divclass=CToolTipid="tt77"><divclass=CFunction>Removes the selector of the given element (hides selection box)</div></div><divclass=CToolTipid="tt78"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var remapElement = this.remapElement = function(</td><tdclass=PParameternowrap>selected,</td></tr><tr><td></td><tdclass=PParameternowrap>changes,</td></tr><tr><td></td><tdclass=PParameternowrap>m</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Applies coordinate changes to an element based on the given matrix</div></div><divclass=CToolTipid="tt79"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>var RemoveElementCommand = this.undoCmd.removeElement = function(</td><tdclass=PParameternowrap>elem,</td></tr><tr><td></td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>text</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>History command for an element removed from the DOM</div></div><divclass=CToolTipid="tt80"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.removeFromSelection = function(</td><tdclass=PParameternowrap>elemsToRemove</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Removes elements from the selection.</div></div><divclass=CToolTipid="tt81"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>var removeUnusedDefElems = this.removeUnusedDefElems = function()</td></tr></table></blockquote>Looks at DOM elements inside the defs to see if they are referred to, removes them from the DOM if they are not.</div></div><divclass=CToolTipid="tt82"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.renameCurrentLayer = function(</td><tdclass=PParameternowrap>newname</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Renames the current layer. </div></div><divclass=CToolTipid="tt83"><divclass=CFunction>Returns the selector based on the given element</div></div><divclass=CToolTipid="tt84"><divclass=CFunction>Used to reset the id and element that the selector is attached to</div></div><divclass=CToolTipid="tt85"><divclass=CFunction><blockquote><tableborder=0cel