Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 addCommandToHistory, SvgCanvas
 addSubCommand, SvgCanvas.BatchCommand
 addToSelection, SelectorManager
 apply
B
 BatchCommand, SvgCanvas
 beginUndoableChange, SvgCanvas
C
 ChangeElementCommand, SvgCanvas
 clear, SelectorManager
 clearSelection, SelectorManager
 createLayer, SelectorManager
D
 deleteCurrentLayer, SelectorManager
E
 elements
F
 finishUndoableChange, SvgCanvas
 fromXml, SvgCanvas
G
 getCurrentLayer, SelectorManager
 getLayer, SelectorManager
 getLayerOpacity, SelectorManager
 getLayerVisibility, SelectorManager
 getNextRedoCommandText, SvgCanvas.undoMgr
 getNextUndoCommandText, SvgCanvas.undoMgr
 getNumLayers, SelectorManager
 getRedoStackSize, SvgCanvas.undoMgr
 getRubberBandBox, SelectorManager.SelectorManager
 getSvgString, SelectorManager
 getUndoStackSize, SvgCanvas.undoMgr
 getVersion, SelectorManager
I
 importSvgString, SelectorManager
 initGroup, SelectorManager.SelectorManager
 InsertElementCommand, SvgCanvas
 isEmpty, SvgCanvas.BatchCommand
M
 MoveElementCommand, SvgCanvas
 moveSelectedToLayer, SelectorManager
R
 redo, SvgCanvas.undoMgr
 releaseSelector, SelectorManager.SelectorManager
 RemoveElementCommand, SvgCanvas
 removeFromSelection, SelectorManager
 renameCurrentLayer, SelectorManager
 requestSelector, SelectorManager.SelectorManager
 reset, Selector.Selector
 resetUndoStack, SvgCanvas
 resize, Selector.Selector
S
 save, SelectorManager
 selectAllInCurrentLayer, SelectorManager
 setCurrentLayer, SelectorManager
 setCurrentLayerPosition, SelectorManager
 setForeignString(xmlString,elt)
 setLayerOpacity, SelectorManager
 setLayerVisibility, SelectorManager
 setSvgString, SelectorManager
 showGrips, Selector.Selector
T
 toXml, SvgCanvas
U
 unapply
 undo, SvgCanvas.undoMgr
 updateGripCursors, Selector.Selector
addCommandToHistory = c.undoCmd.add = function(cmd)
Adds a command object to the undo history stack
Adds a given command to the history stack
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Runs “apply” on all subcommands
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
c.beginUndoableChange = function(attrName,
elems)
This function tells the canvas to remember the old values of the attrName attribute for each element sent in.
var ChangeElementCommand = this.undoCmd.changeElement = function(elem,
attrs,
text)
History command to make a change to an element.
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
this.createLayer = function(name)
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.deleteCurrentLayer = function()
Deletes the current layer from the drawing and then clears the selection.
Iterate through all our subcommands and returns all the elements we are changing
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
c.finishUndoableChange = function()
This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
fromXml = function(str)
Converts XML entities in a string to single characters.
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
this.getLayer = function(i)
Returns the name of the ith layer.
this.getLayerOpacity = function(layername)
Returns the opacity of the given layer.
this.getLayerVisibility = function(layername)
Returns whether the layer is visible.
String associated with the next redo command
String associated with the next undo command
this.getNumLayers = function()
Returns the number of layers in the current drawing.
Integer with the current size of the redo history stack
Returns the rubberBandBox DOM element.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
Integer with the current size of the undo history stack
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
This function imports the input SVG XML into the current layer in the drawing
Resets the parent selector group element
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
Returns a boolean indicating whether or not the batch command is empty
var MoveElementCommand = this.undoCmd.moveElement = function(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
Performs a redo step
Removes the selector of the given element (hides selection box)
var RemoveElementCommand = this.undoCmd.removeElement = function(elem,
parent,
text)
History command for an element removed from the DOM
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
Returns the selector based on the given element
Used to reset the id and element that the selector is attached to
resetUndoStack = function()
Resets the undo stack, effectively clearing the undo/redo history
Updates the selector to match the element’s size
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
function setForeignString(xmlString)
This function sets the content of element elt to the input XML.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
Show the resize grips of this selector
toXml = function(str)
Converts characters in a string to XML-friendly entities.
Runs “unapply” on all subcommands
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
Performs an undo step
Updates cursors for corner grips on rotation so arrows point the right way
Close