<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="SvgCanvas"></a>SvgCanvas</h1><divclass=CBody><p>The main SvgCanvas class that manages all SVG-related functions</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>The container HTML element that should hold the SVG root element</td></tr><tr><tdclass=CDLEntry>config</td><tdclass=CDLDescription>An object that contains configuration data</td></tr></table><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#SvgCanvas">SvgCanvas</a></td><tdclass=SDescription>The main SvgCanvas class that manages all SVG-related functions</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.toXml"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">toXml</a></td><tdclass=SDescription>Converts characters in a string to XML-friendly entities.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#SvgCanvas.fromXml"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">fromXml</a></td><tdclass=SDescription>Converts XML entities in a string to single characters. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#SvgCanvas.Undo/Redo_history_management">Undo/<wbr>Redo history management</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.ChangeElementCommand"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">ChangeElementCommand</a></td><tdclass=SDescription>History command to make a change to an element. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#SvgCanvas.ChangeElementCommand.apply">ChangeElementCommand.<wbr>apply</a></td><tdclass=SDescription>Performs the stored change action</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.ChangeElementCommand.unapply">ChangeElementCommand.<wbr>unapply</a></td><tdclass=SDescription>Reverses the stored change action</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#SvgCanvas.ChangeElementCommand.elements">ChangeElementCommand.<wbr>elements</a></td><tdclass=SDescription>Returns array with element associated with this command</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.InsertElementCommand"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">InsertElementCommand</a></td><tdclass=SDescription>History command for an element that was added to the DOM</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#SvgCanvas.InsertElementCommand.apply">InsertElementCommand.<wbr>apply</a></td><tdclass=SDescription>Re-Inserts the new element</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.InsertElementCommand.unapply">InsertElementCommand.<wbr>unapply</a></td><tdclass=SDescription>Removes the element</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#SvgCanvas.InsertElementCommand.elements">InsertElementCommand.<wbr>elements</a></td><tdclass=SDescription>Returns array with element associated with this command</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.RemoveElementCommand"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">RemoveElementCommand</a></td><tdclass=SDescription>History command for an element removed from the DOM</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#SvgCanvas.RemoveElementCommand.apply">RemoveElementCommand.<wbr>apply</a></td><tdclass=SDescription>Re-removes the new element</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#SvgCanvas.RemoveElementCommand.unapply">RemoveElementCommand.<wbr>unapply</a></td><td
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.toXml"></a>toXml</h3><divclass=CBody><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><p>Converts characters in a string to XML-friendly entities.</p><p>Example: “&” becomes “&amp;”</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>str</td><tdclass=CDLDescription>The string to be converted</td></tr></table><h4class=CHeading>Returns</h4><p>The converted string</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.fromXml"></a>fromXml</h3><divclass=CBody><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><p>Converts XML entities in a string to single characters. Example: “&amp;” becomes “&”</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>str</td><tdclass=CDLDescription>The string to be converted</td></tr></table><h4class=CHeading>Returns</h4><p>The converted string</p></div></div></div>
<divclass="CGroup"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.Undo/Redo_history_management"></a>Undo/<wbr>Redo history management</h3></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.ChangeElementCommand"></a>ChangeElementCommand</h3><divclass=CBody><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><p>History command to make a change to an element. Usually an attribute change, but can also be textcontent.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>The DOM element that was changed</td></tr><tr><tdclass=CDLEntry>attrs</td><tdclass=CDLDescription>An object with the attributes to be changed and the values they had <b>before</b> the change</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>An optional string visible to user related to this change</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.ChangeElementCommand.apply"></a>ChangeElementCommand.<wbr>apply</h3><divclass=CBody><p>Performs the stored change action</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.ChangeElementCommand.unapply"></a>ChangeElementCommand.<wbr>unapply</h3><divclass=CBody><p>Reverses the stored change action</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.ChangeElementCommand.elements"></a>ChangeElementCommand.<wbr>elements</h3><divclass=CBody><p>Returns array with element associated with this command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.InsertElementCommand"></a>InsertElementCommand</h3><divclass=CBody><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><p>History command for an element that was added to the DOM</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>The newly added DOM element</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>An optional string visible to user related to this change</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.InsertElementCommand.apply"></a>InsertElementCommand.<wbr>apply</h3><divclass=CBody><p>Re-Inserts the new element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.InsertElementCommand.unapply"></a>InsertElementCommand.<wbr>unapply</h3><divclass=CBody><p>Removes the element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.InsertElementCommand.elements"></a>InsertElementCommand.<wbr>elements</h3><divclass=CBody><p>Returns array with element associated with this command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.RemoveElementCommand"></a>RemoveElementCommand</h3><divclass=CBody><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><p>History command for an element removed from the DOM</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>The removed DOM element</td></tr><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>The DOM element’s parent</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>An optional string visible to user related to this change</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.RemoveElementCommand.apply"></a>RemoveElementCommand.<wbr>apply</h3><divclass=CBody><p>Re-removes the new element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.RemoveElementCommand.unapply"></a>RemoveElementCommand.<wbr>unapply</h3><divclass=CBody><p>Re-adds the new element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.RemoveElementCommand.elements"></a>RemoveElementCommand.<wbr>elements</h3><divclass=CBody><p>Returns array with element associated with this command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.MoveElementCommand"></a>MoveElementCommand</h3><divclass=CBody><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><p>History command for an element that had its DOM position changed</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>The DOM element that was moved</td></tr><tr><tdclass=CDLEntry>oldNextSibling</td><tdclass=CDLDescription>The element’s next sibling before it was moved</td></tr><tr><tdclass=CDLEntry>oldParent</td><tdclass=CDLDescription>The element’s parent before it was moved</td></tr><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>An optional string visible to user related to this change</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.MoveElementCommand.unapply"></a>MoveElementCommand.<wbr>unapply</h3><divclass=CBody><p>Re-positions the element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.MoveElementCommand.unapply"></a>MoveElementCommand.<wbr>unapply</h3><divclass=CBody><p>Positions the element back to its original location</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.MoveElementCommand.elements"></a>MoveElementCommand.<wbr>elements</h3><divclass=CBody><p>Returns array with element associated with this command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand"></a>BatchCommand</h3><divclass=CBody><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><p>History command that can contain/execute multiple other commands</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>text</td><tdclass=CDLDescription>An optional string visible to user related to this change</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand.apply"></a>BatchCommand.<wbr>apply</h3><divclass=CBody><p>Runs “apply” on all subcommands</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand.unapply"></a>BatchCommand.<wbr>unapply</h3><divclass=CBody><p>Runs “unapply” on all subcommands</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand.elements"></a>BatchCommand.<wbr>elements</h3><divclass=CBody><p>Iterate through all our subcommands and returns all the elements we are changing</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand.addSubCommand"></a>BatchCommand.<wbr>addSubCommand</h3><divclass=CBody><p>Adds a given command to the history stack</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.BatchCommand.isEmpty"></a>BatchCommand.<wbr>isEmpty</h3><divclass=CBody><p>Returns a boolean indicating whether or not the batch command is empty</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.resetUndoStack"></a>resetUndoStack</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>resetUndoStack = function()</td></tr></table></blockquote><p>Resets the undo stack, effectively clearing the undo/redo history</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.getUndoStackSize"></a>undoMgr.<wbr>getUndoStackSize</h3><divclass=CBody><h4class=CHeading>Returns</h4><p>Integer with the current size of the undo history stack</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.getRedoStackSize"></a>undoMgr.<wbr>getRedoStackSize</h3><divclass=CBody><h4class=CHeading>Returns</h4><p>Integer with the current size of the redo history stack</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.getNextUndoCommandText"></a>undoMgr.<wbr>getNextUndoCommandText</h3><divclass=CBody><h4class=CHeading>Returns</h4><p>String associated with the next undo command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.getNextRedoCommandText"></a>undoMgr.<wbr>getNextRedoCommandText</h3><divclass=CBody><h4class=CHeading>Returns</h4><p>String associated with the next redo command</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.undo"></a>undoMgr.undo</h3><divclass=CBody><p>Performs an undo step</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.undoMgr.redo"></a>undoMgr.redo</h3><divclass=CBody><p>Performs a redo step</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.addCommandToHistory"></a>addCommandToHistory</h3><divclass=CBody><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><p>Adds a command object to the undo history stack</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cmd</td><tdclass=CDLDescription>The command object to add</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.beginUndoableChange"></a>beginUndoableChange</h3><divclass=CBody><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><p>This function tells the canvas to remember the old values of the attrName attribute for each element sent in. The elements and values are stored on a stack, so the next call to finishUndoableChange() will pop the elements and old values off the stack, gets the current values from the DOM and uses all of these to construct the undo-able command.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>attrName</td><tdclass=CDLDescription>The name of the attribute being changed</td></tr><tr><tdclass=CDLEntry>elems</td><tdclass=CDLDescription>Array of DOM elements being changed</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SvgCanvas.finishUndoableChange"></a>finishUndoableChange</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>c.finishUndoableChange = function()</td></tr></table></blockquote><p>This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called. The command can then be added to the command history</p><h4class=CHeading>Returns</h4><p>Batch command object with resulting changes</p></div></div></div>
<divclass="CClass"><divclass=CTopic><h2class=CTitle><aname="Selector"></a>Selector</h2><divclass=CBody><p>Private class for DOM element selection boxes</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>integer to internally indentify the selector</td></tr><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>DOM element associated with this selector</td></tr></table><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SGroup"><tdclass=SEntry><ahref="#Selector.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#Selector.Selector.reset">Selector.<wbr>reset</a></td><tdclass=SDescription>Used to reset the id and element that the selector is attached to</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#Selector.Selector.showGrips">Selector.<wbr>showGrips</a></td><tdclass=SDescription>Show the resize grips of this selector</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#Selector.Selector.updateGripCursors">Selector.<wbr>updateGripCursors</a></td><tdclass=SDescription>Updates cursors for corner grips on rotation so arrows point the right way</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#Selector.Selector.resize">Selector.<wbr>resize</a></td><tdclass=SDescription>Updates the selector to match the element’s size</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="Selector.Selector.reset"></a>Selector.<wbr>reset</h3><divclass=CBody><p>Used to reset the id and element that the selector is attached to</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>e</td><tdclass=CDLDescription>DOM element associated with this selector</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="Selector.Selector.showGrips"></a>Selector.<wbr>showGrips</h3><divclass=CBody><p>Show the resize grips of this selector</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>show</td><tdclass=CDLDescription>boolean indicating whether grips should be shown or not</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="Selector.Selector.updateGripCursors"></a>Selector.<wbr>updateGripCursors</h3><divclass=CBody><p>Updates cursors for corner grips on rotation so arrows point the right way</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>angle</td><tdclass=CDLDescription>Float indicating current rotation angle in degrees</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="Selector.Selector.resize"></a>Selector.<wbr>resize</h3><divclass=CBody><p>Updates the selector to match the element’s size</p></div></div></div>
<divclass="CClass"><divclass=CTopic><h2class=CTitle><aname="SelectorManager"></a>SelectorManager</h2><divclass=CBody><p>public class to manage all selector objects (selection boxes)</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SFunction"><tdclass=SEntry><ahref="#SelectorManager.SelectorManager.initGroup">SelectorManager.<wbr>initGroup</a></td><tdclass=SDescription>Resets the parent selector group element</td></tr><trclass="SFunction SMarked"><tdclass=SEntry><ahref="#SelectorManager.SelectorManager.requestSelector">SelectorManager.<wbr>requestSelector</a></td><tdclass=SDescription>Returns the selector based on the given element</td></tr><trclass="SFunction"><tdclass=SEntry><ahref="#SelectorManager.SelectorManager.releaseSelector">SelectorManager.<wbr>releaseSelector</a></td><tdclass=SDescription>Removes the selector of the given element (hides selection box)</td></tr><trclass="SFunction SMarked"><tdclass=SEntry><ahref="#SelectorManager.SelectorManager.getRubberBandBox">SelectorManager.<wbr>getRubberBandBox</a></td><tdclass=SDescription>Returns the rubberBandBox DOM element. </td></tr><trclass="SGroup"><tdclass=SEntry><ahref="#SelectorManager.Selection">Selection</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SelectorManager.clearSelection"id=link34onMouseOver="ShowTip(event, 'tt12', 'link34')"onMouseOut="HideTip('tt12')">clearSelection</a></td><tdclass=SDescription>Clears the selection. </td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#SelectorManager.addToSelection"id=link35onMouseOver="ShowTip(event, 'tt13', 'link35')"onMouseOut="HideTip('tt13')">addToSelection</a></td><tdclass=SDescription>Adds a list of elements to the selection. </td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SelectorManager.removeFromSelection"id=link36onMouseOver="ShowTip(event, 'tt14', 'link36')"onMouseOut="HideTip('tt14')">removeFromSelection</a></td><tdclass=SDescription>Removes elements from the selection.</td></tr><trclass="SGroup"><tdclass=SEntry><ahref="#SelectorManager.Serialization">Serialization</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SelectorManager.save"id=link37onMouseOver="ShowTip(event, 'tt15', 'link37')"onMouseOut="HideTip('tt15')">save</a></td><tdclass=SDescription>Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. </td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#SelectorManager.getSvgString"id=link38onMouseOver="ShowTip(event, 'tt16', 'link38')"onMouseOut="HideTip('tt16')">getSvgString</a></td><tdclass=SDescription>Returns the current drawing as raw SVG XML text.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SelectorManager.setSvgString"id=link39onMouseOver="ShowTip(event, 'tt17', 'link39')"onMouseOut="HideTip('tt17')">setSvgString</a></td><tdclass=SDescription>This function sets the current drawing as the input SVG XML.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#SelectorManager.importSvgString">importSvgString</a></td><tdclass=SDescription>This function imports the input SVG XML into the current layer in the drawing</td></tr><trclass="SGroup"><tdclass=SEntry><ahref="#SelectorManager.Layers">Layers</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#SelectorManager.createLayer"id=link40onMouseOver="ShowTip(event, 'tt18', 'link40')"onMouseOut="HideTip('tt18')">createLayer</a></td><tdclass=SDescription>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. </td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#SelectorManager.deleteCurrentLayer"id=link41onMouseOver
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.SelectorManager.initGroup"></a>SelectorManager.<wbr>initGroup</h3><divclass=CBody><p>Resets the parent selector group element</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.SelectorManager.requestSelector"></a>SelectorManager.<wbr>requestSelector</h3><divclass=CBody><p>Returns the selector based on the given element</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>DOM element to get the selector for</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.SelectorManager.releaseSelector"></a>SelectorManager.<wbr>releaseSelector</h3><divclass=CBody><p>Removes the selector of the given element (hides selection box)</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elem</td><tdclass=CDLDescription>DOM element to remove the selector for</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.SelectorManager.getRubberBandBox"></a>SelectorManager.<wbr>getRubberBandBox</h3><divclass=CBody><p>Returns the rubberBandBox DOM element. This is the rectangle drawn by the user for selecting/zooming</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.clearSelection"></a>clearSelection</h3><divclass=CBody><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><p>Clears the selection. The ‘selected’ handler is then called.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.addToSelection"></a>addToSelection</h3><divclass=CBody><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><p>Adds a list of elements to the selection. The ‘selected’ handler is then called.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elemsToAdd</td><tdclass=CDLDescription>an array of DOM elements to add to the selection</td></tr><tr><tdclass=CDLEntry>showGrips</td><tdclass=CDLDescription>a boolean flag indicating whether the resize grips should be shown</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.removeFromSelection"></a>removeFromSelection</h3><divclass=CBody><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><p>Removes elements from the selection.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>elemsToRemove</td><tdclass=CDLDescription>an array of elements to remove from selection</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.save"></a>save</h3><divclass=CBody><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><p>Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. This function also includes the XML prolog. Clients of the SvgCanvas bind their save function to the ‘saved’ event.</p><h4class=CHeading>Returns</h4><p>Nothing</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getSvgString"></a>getSvgString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getSvgString = function()</td></tr></table></blockquote><p>Returns the current drawing as raw SVG XML text.</p><h4class=CHeading>Returns</h4><p>The current drawing as raw SVG XML text.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.setSvgString"></a>setSvgString</h3><divclass=CBody><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><p>This function sets the current drawing as the input SVG XML.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>xmlString</td><tdclass=CDLDescription>The SVG as XML text.</td></tr></table><h4class=CHeading>Returns</h4><p>This function returns false if the set was unsuccessful, true otherwise.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.importSvgString"></a>importSvgString</h3><divclass=CBody><p>This function imports the input SVG XML into the current layer in the drawing</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>xmlString</td><tdclass=CDLDescription>The SVG as XML text.</td></tr></table><h4class=CHeading>Returns</h4><p>This function returns false if the import was unsuccessful, true otherwise.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.createLayer"></a>createLayer</h3><divclass=CBody><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><p>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. This is an undoable action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>name</td><tdclass=CDLDescription>The given name</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.deleteCurrentLayer"></a>deleteCurrentLayer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.deleteCurrentLayer = function()</td></tr></table></blockquote><p>Deletes the current layer from the drawing and then clears the selection. This function then calls the ‘changed’ handler. This is an undoable action.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getNumLayers"></a>getNumLayers</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getNumLayers = function()</td></tr></table></blockquote><p>Returns the number of layers in the current drawing.</p><h4class=CHeading>Returns</h4><p>The number of layers in the current drawing.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getLayer"></a>getLayer</h3><divclass=CBody><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><p>Returns the name of the ith layer. If the index is out of range, an empty string is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>i</td><tdclass=CDLDescription>the zero-based index of the layer you are querying.</td></tr></table><h4class=CHeading>Returns</h4><p>The name of the ith layer</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getCurrentLayer"></a>getCurrentLayer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getCurrentLayer = function()</td></tr></table></blockquote><p>Returns the name of the currently selected layer. If an error occurs, an empty string is returned.</p><h4class=CHeading>Returns</h4><p>The name of the currently active layer.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.setCurrentLayer"></a>setCurrentLayer</h3><divclass=CBody><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><p>Sets the current layer. If the name is not a valid layer name, then this function returns false. Otherwise it returns true. This is not an undo-able action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>name</td><tdclass=CDLDescription>the name of the layer you want to switch to.</td></tr></table><h4class=CHeading>Returns</h4><p>true if the current layer was switched, otherwise false</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.renameCurrentLayer"></a>renameCurrentLayer</h3><divclass=CBody><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><p>Renames the current layer. If the layer name is not valid (i.e. unique), then this function does nothing and returns false, otherwise it returns true. This is an undo-able action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>newname</td><tdclass=CDLDescription>the new name you want to give the current layer. This name must be unique among all layer names.</td></tr></table><h4class=CHeading>Returns</h4><p>true if the rename succeeded, false otherwise.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.setCurrentLayerPosition"></a>setCurrentLayerPosition</h3><divclass=CBody><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><p>Changes the position of the current layer to the new value. If the new index is not valid, this function does nothing and returns false, otherwise it returns true. This is an undo-able action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>newpos</td><tdclass=CDLDescription>The zero-based index of the new position of the layer. This should be between</td></tr><tr><tdclass=CDLEntry>0 and (number of layers</td><tdclass=CDLDescription>1)</td></tr></table><h4class=CHeading>Returns</h4><p>true if the current layer position was changed, false otherwise.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getLayerVisibility"></a>getLayerVisibility</h3><divclass=CBody><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><p>Returns whether the layer is visible. If the layer name is not valid, then this function returns false.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>layername</td><tdclass=CDLDescription>the name of the layer which you want to query.</td></tr></table><h4class=CHeading>Returns</h4><p>The visibility state of the layer, or false if the layer name was invalid.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.setLayerVisibility"></a>setLayerVisibility</h3><divclass=CBody><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><p>Sets the visibility of the layer. If the layer name is not valid, this function return false, otherwise it returns true. This is an undo-able action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>layername</td><tdclass=CDLDescription>the name of the layer to change the visibility</td></tr><tr><tdclass=CDLEntry>bVisible</td><tdclass=CDLDescription>true/false, whether the layer should be visible</td></tr></table><h4class=CHeading>Returns</h4><p>true if the layer’s visibility was set, false otherwise</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.moveSelectedToLayer"></a>moveSelectedToLayer</h3><divclass=CBody><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><p>Moves the selected elements to layername. If the name is not a valid layer name, then false is returned. Otherwise it returns true. This is an undo-able action.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>layername</td><tdclass=CDLDescription>the name of the layer you want to which you want to move the selected elements</td></tr></table><h4class=CHeading>Returns</h4><p>true if the selected elements were moved to the layer, false otherwise.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getLayerOpacity"></a>getLayerOpacity</h3><divclass=CBody><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><p>Returns the opacity of the given layer. If the input name is not a layer, null is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>layername</td><tdclass=CDLDescription>name of the layer on which to get the opacity</td></tr></table><h4class=CHeading>Returns</h4><p>The opacity value of the given layer. This will be a value between 0.0 and 1.0, or null if layername is not a valid layer</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.setLayerOpacity"></a>setLayerOpacity</h3><divclass=CBody><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><p>Sets the opacity of the given layer. If the input name is not a layer, nothing happens. This is not an undo-able action. NOTE: this function exists solely to apply a highlighting/de-emphasis effect to a layer, when it is possible for a user to affect the opacity of a layer, we will need to allow this function to produce an undo-able action. If opacity is not a value between 0.0 and 1.0, then nothing happens.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>layername</td><tdclass=CDLDescription>name of the layer on which to set the opacity</td></tr><tr><tdclass=CDLEntry>opacity</td><tdclass=CDLDescription>a float value in the range 0.0-1.0</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.selectAllInCurrentLayer"></a>selectAllInCurrentLayer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.selectAllInCurrentLayer = function()</td></tr></table></blockquote><p>Clears the selection, then adds all elements in the current layer to the selection. This function then fires the selected event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.clear"></a>clear</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.clear = function()</td></tr></table></blockquote><p>Clears the current document. This is not an undoable action.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="SelectorManager.getVersion"></a>getVersion</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.getVersion = function()</td></tr></table></blockquote><p>Returns a string which describes the revision number of SvgCanvas.</p></div></div></div>
<divclass=CToolTipid="tt1"><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><divclass=CToolTipid="tt2"><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><divclass=CToolTipid="tt3"><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="tt4"><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="tt5"><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="tt6"><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="tt7"><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="tt8"><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="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=