<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>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="tt4"><divclass=CFunction>Runs “apply” on all subcommands</div></div><divclass=CToolTipid="tt5"><divclass=CFunction>Performs the stored change action</div></div><divclass=CToolTipid="tt6"><divclass=CFunction>Re-Inserts the new element</div></div><divclass=CToolTipid="tt7"><divclass=CFunction>Re-removes the new element</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt8"><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="tt9"><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><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt10"><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="tt11"><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="tt12"><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="tt13"><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="tt14"><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="tt15"><divclass=CFunction>Iterate through all our subcommands and returns all the elements we are changing</div></div><divclass=CToolTipid="tt16"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt17"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt18"><divclass=CFunction>Returns array with element associated with this command</div></div><divclass=CToolTipid="tt19"><divclass=CFunction>Returns array with element associated with this command</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt20"><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="tt21"><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="tt22"><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="tt23"><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="tt24"><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="tt25"><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="tt26"><divclass=CFunction>String associated with the next redo command</div></div><divclass=CToolTipid="tt27"><divclass=CFunction>String associated with the next undo command</div></div><divclass=CToolTipid="tt28"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getNumLayers = function()</td></tr></table></blockquote>Returns the number of layers in the current drawing.</div></div><divclass=CToolTipid="tt29"><divclass=CFunction>Integer with the current size of the redo history stack</div></div><divclass=CToolTipid="tt30"><divclass=CFunction>Returns the rubberBandBox DOM element. </div></div><divclass=CToolTipid="tt31"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getSvgString = function()</td></tr></table></blockquote>Returns the current drawing as raw SVG XML text.</div></div><divclass=CToolTipid="tt32"><divclass=CFunction>Integer with the current size of the undo history stack</div></div><divclass=CToolTipid="tt33"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getVersion = function()</td></tr></table></blockquote>Returns a string which describes the revision number of SvgCanvas.</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt34"><divclass=CFunction>This function imports the input SVG XML into the current layer in the drawing</div></div><divclass=CToolTipid="tt35"><divclass=CFunction>Resets the parent selector group element</div></div><divclass=CToolTipid="tt36"><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="tt37"><divclass=CFunction>Returns a boolean indicating whether or not the batch command is empty</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 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="tt39"><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="tt40"><divclass=CFunction>Performs a redo step</div></div><divclass=CToolTipid="tt41"><divclass=CFunction>Removes the selector of the given element (hides selection box)</div></div><divclass=CToolTipid="tt42"><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="tt43"><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="tt44"><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="tt45"><divclass=CFunction>Returns the selector based on the given element</div></div><divclass=CToolTipid="tt46"><divclass=CFunction>Used to reset the id and element that the selector is attached to</div></div><divclass=CToolTipid="tt47"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>resetUndoStack = function()</td></tr></table></blockquote>Resets the undo stack, effectively clearing the undo/redo history</div></div><divclass=CToolTipid="tt48"><divclass=CFunction>Updates the selector to match the element’s size</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt49"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.save = function(</td><tdclass=PParameternowrap>opts</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. </div></div><divclass=CToolTipid="tt50"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.selectAllInCurrentLayer = function()</td></tr></table></blockquote>Clears the selection, then adds all elements in the current layer to the selection. </div></div><divclass=CToolTipid="tt51"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.setCurrentLayer = function(</td><tdclass=PParameternowrap>name</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the current layer. </div></div><divclass=CToolTipid="tt52"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.setCurrentLayerPosition = function(</td><tdclass=PParameternowrap>newpos</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Changes the position of the current layer to the new value. </div></div><divclass=CToolTipid="tt53"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function setForeignString(</td><tdclass=PParameternowrap>xmlString</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>This function sets the content of element elt to the input XML.</div></div><divclass=CToolTipid="tt54"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.setLayerOpacity = function(</td><tdclass=PParameternowrap>layername,</td></tr><tr><td></td><tdclass=PParameternowrap>opacity</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the opacity of the given layer. </div></div><divclass=CToolTipid="tt55"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.setLayerVisibility = function(</td><tdclass=PParameternowrap>layername,</td></tr><tr><td></td><tdclass=PParameternowrap>bVisible</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the visibility of the layer. </div></div><divclass=CToolTipid="tt56"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>this.setSvgString = function(</td><tdclass=PParameternowrap>xmlString</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>This function sets the current drawing as the input SVG XML.</div></div><divclass=CToolTipid="tt57"><divclass=CFunction>Show the resize grips of this selector</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt58"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>toXml = function(</td><tdclass=PParameternowrap>str</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Converts characters in a string to XML-friendly entities.</div></div><!--END_ND_TOOLTIPS-->
<divclass=CToolTipid="tt59"><divclass=CFunction>Runs “unapply” on all subcommands</div></div><divclass=CToolTipid="tt60"><divclass=CFunction>Reverses the stored change action</div></div><divclass=CToolTipid="tt61"><divclass=CFunction>Removes the element</div></div><divclass=CToolTipid="tt62"><divclass=CFunction>Re-positions the element</div></div><divclass=CToolTipid="tt63"><divclass=CFunction>Re-adds the new element</div></div><divclass=CToolTipid="tt64"><divclass=CFunction>Performs an undo step</div></div><divclass=CToolTipid="tt65"><divclass=CFunction>Updates cursors for corner grips on rotation so arrows point the right way</div></div><!--END_ND_TOOLTIPS-->