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
 addSvgElementFromJson, SelectorManager
 addToSelection, SelectorManager
 apply
 assignAttributes, SelectorManager
B
 BatchCommand, SvgCanvas
 beginUndoableChange, SvgCanvas
 bind, SelectorManager
C
 ChangeElementCommand, SvgCanvas
 changeSelectedAttribute, SelectorManager
 changeSelectedAttributeNoUndo, SelectorManager
 cleanupElement, SelectorManager
 clear, SelectorManager
 clearSelection, SelectorManager
 convertToNum, SvgCanvas
 convertToPath, SelectorManager
 createLayer, SelectorManager
D
 deleteCurrentLayer, SelectorManager
 deleteSelectedElements, SelectorManager
E
 elements
 embedImage, SelectorManager
F
 ffClone, SelectorManager
 findDefs, SelectorManager
 findDuplicateGradient, SelectorManager
 finishUndoableChange, SvgCanvas
 fromXml, SvgCanvas
G
 getBBox, SelectorManager
 getBlur, SelectorManager
 getBold, SelectorManager
 getColor, SelectorManager
 getContentElem, SelectorManager
 getCurrentLayer, SelectorManager
 getDocumentTitle, SelectorManager
 getEditorNS, SelectorManager
 getFontFamily, SelectorManager
 getFontSize, SelectorManager
 getId, SelectorManager
 getItalic, SelectorManager
 getLayer, SelectorManager
 getLayerOpacity, SelectorManager
 getLayerVisibility, SelectorManager
 getMatrix, SelectorManager
 getMode, SelectorManager
 getMouseTarget, SelectorManager
 getNextId, SelectorManager
 getNextRedoCommandText, SvgCanvas.undoMgr
 getNextUndoCommandText, SvgCanvas.undoMgr
 getNumLayers, SelectorManager
 getOffset, SelectorManager
 getOpacity, SelectorManager
 getPathBBox, SelectorManager
 getRedoStackSize, SvgCanvas.undoMgr
 getResolution, SelectorManager
 getRootElem, SelectorManager
 getRotationAngle, SelectorManager
 getRubberBandBox, SelectorManager.SelectorManager
 getSelectedElems, SelectorManager
 getStrokeOpacity, SelectorManager
 getStrokeWidth, SelectorManager
 getSvgString, SelectorManager
 getText, SelectorManager
 getTransformList, SelectorManager
 getUndoStackSize, SvgCanvas.undoMgr
 getUrlFromAttr, SelectorManager
 getVersion, SelectorManager
 groupSelectedElements, SelectorManager
H
 hasMatrixTransform, SelectorManager
addCommandToHistory = c.undoCmd.add = function(cmd)
Adds a command object to the undo history stack
Adds a given command to the history stack
var addSvgElementFromJson = this.addSvgElementFromJson = function(data)
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
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 assignAttributes = this.assignAttributes = function(node,
attrs,
suspendLength,
unitCheck)
Assigns multiple attributes to an 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.
c.bind = function(event,
f)
Attaches a callback function to an event
var ChangeElementCommand = this.undoCmd.changeElement = function(elem,
attrs,
text)
History command to make a change to an element.
this.changeSelectedAttribute = function(attr,
val,
elems)
Change the given/selected element and add the original value to the history stack If you want to change all selectedElements, ignore the elems argument.
this.changeSelectedAttributeNoUndo = function(attr,
newValue,
elems)
This function makes the changes to the elements.
var cleanupElement = this.cleanupElement = function(element)
Remove unneeded (default) attributes, makes resulting SVG smaller
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
convertToNum = function(attr,
val)
Converts given values to numbers.
this.convertToPath = function(elem,
getBBox)
Convert selected element to a path, or get the BBox of an element-as-path
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.
this.deleteSelectedElements = function()
Removes all selected elements from the DOM and adds the change to the history stack
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
this.embedImage = function(val,
callback)
Converts a given image file to a data URL when possible, then runs a given callback
var ffClone = function(elem)
Hack for Firefox bugs where text element features aren’t updated.
var findDefs = function()
Return the document’s defs element, create it first if necessary
var findDuplicateGradient = function(grad)
Check if exact gradient already exists
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.getBBox = function(elem)
Get the given/selected element’s bounding box object, convert it to be more usable when necessary
this.getBlur = function(elem)
Gets the stdDeviation blur value of the given element
this.getBold = function()
Check whether selected element is bold or not
this.getColor = function(type)
Returns the current fill/stroke option
this.getContentElem = function()
Returns the content DOM element
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
this.getDocumentTitle = function()
Returns the current document title or an empty string if not found
this.getEditorNS = function(add)
Returns the editor’s namespace URL, optionally adds it to root element
this.getFontFamily = function()
Returns the current font family
this.getFontSize = function()
Returns the current font size
getId = c.getId = function()
Returns the last created DOM element ID string
this.getItalic = function()
Check whether selected element is italic or not
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.
var getMatrix = function(elem)
Get the matrix object for a given element
this.getMode = function()
Returns the current editor mode string
var getMouseTarget = this.getMouseTarget = function(evt)
Gets the desired element from a mouse event
getNextId = c.getNextId = function()
Creates and returns a unique ID string for a DOM element
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.
this.getOffset = function()
Returns an object with x, y values indicating the svgcontent element’s position in the editor’s canvas.
this.getOpacity = function()
Returns the current opacity
var getPathBBox = function(path)
Get correct BBox for a path in Webkit Converted from code found here: http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
Integer with the current size of the redo history stack
this.getResolution = function()
Returns the current dimensions and zoom level in an object
this.getRootElem = function()
Returns the root DOM element
this.getRotationAngle = function(elem,
to_rad)
Get the rotation angle of the given/selected DOM element
Returns the rubberBandBox DOM element.
this.getSelectedElems = function()
Returns the array with selected DOM elements
this.getStrokeOpacity = function()
Returns the current stroke opacity
this.getStrokeWidth = function()
Returns the current stroke-width value
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.getText = function()
Returns the current text (textContent) of the selected element
this.getTransformList = function(elem)
Returns an object that behaves like a SVGTransformList for the given DOM element
Integer with the current size of the undo history stack
var getUrlFromAttr = this.getUrlFromAttr = function(attrVal)
Extracts the URL from the url(...)
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
this.groupSelectedElements = function()
Wraps all the selected elements in a group (g) element
var hasMatrixTransform = this.hasMatrixTransform = function(tlist)
See if the given transformlist includes a non-indentity matrix transform
Close