A | |
addCommandToHistory, SvgCanvas | |
addExtension, SelectorManager | |
addSubCommand, SvgCanvas. | |
addSvgElementFromJson, SelectorManager | |
addToSelection, SelectorManager | |
alignSelectedElements, SelectorManager | |
apply | |
assignAttributes, SelectorManager | |
B | |
BatchCommand, SvgCanvas | |
beginUndoableChange, SvgCanvas | |
bind, SelectorManager | |
C | |
ChangeElementCommand, SvgCanvas | |
changeSelectedAttribute, SelectorManager | |
changeSelectedAttributeNoUndo, SelectorManager | |
cleanupElement, SelectorManager | |
clear, SelectorManager | |
clearSelection, SelectorManager | |
cloneSelectedElements, SelectorManager | |
convertToNum, SvgCanvas | |
convertToPath, SelectorManager | |
convertToXMLReferences, SvgCanvas. | |
copyElem, SelectorManager | |
createLayer, SelectorManager | |
cycleElement, SelectorManager | |
D | |
decode64, SvgCanvas. | |
deleteCurrentLayer, SelectorManager | |
deleteSelectedElements, SelectorManager | |
E | |
elements | |
embedImage, SelectorManager | |
encode64, SvgCanvas. | |
F | |
ffClone, SelectorManager | |
findDefs, SelectorManager | |
findDuplicateGradient, SelectorManager | |
finishUndoableChange, SvgCanvas | |
fromXml, SvgCanvas. |
Adds a command object to the undo history stack
addCommandToHistory = c.undoCmd.add = function( cmd )
Add an extension to the editor
this.addExtension = function( name, ext_func )
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
var addSvgElementFromJson = this.addSvgElementFromJson = function( data )
Adds a list of elements to the selection.
var addToSelection = this.addToSelection = function( elemsToAdd, showGrips )
Aligns selected elements
this.alignSelectedElements = function( type, relative_to )
Assigns multiple attributes to an element.
var assignAttributes = this.assignAttributes = function( node, attrs, suspendLength, unitCheck )
History command that can contain/execute multiple other commands
var BatchCommand = this.undoCmd.batch = function( text )
This function tells the canvas to remember the old values of the attrName attribute for each element sent in.
c.beginUndoableChange = function( attrName, elems )
Attaches a callback function to an event
c.bind = function( event, f )
History command to make a change to an element.
var ChangeElementCommand = this.undoCmd.changeElement = function( elem, attrs, text )
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.
var changeSelectedAttribute = this.changeSelectedAttribute = function( attr, val, elems )
This function makes the changes to the elements.
var changeSelectedAttributeNoUndo = function( attr, newValue, elems )
Remove unneeded (default) attributes, makes resulting SVG smaller
var cleanupElement = this.cleanupElement = function( element )
Clears the current document.
this.clear = function()
Clears the selection.
var clearSelection = this.clearSelection = function( noCall )
Create deep DOM copies (clones) of all selected elements and move them slightly from their originals
this.cloneSelectedElements = function()
Converts given values to numbers.
convertToNum = function( attr, val )
Convert selected element to a path, or get the BBox of an element-as-path
this.convertToPath = function( elem, getBBox )
Create a clone of an element, updating its ID and its children’s IDs when needed
var copyElem = function( el )
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.createLayer = function( name )
Select the next/previous element within the current layer
this.cycleElement = function( next )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Removes all selected elements from the DOM and adds the change to the history stack
this.deleteSelectedElements = function()
Converts a given image file to a data URL when possible, then runs a given callback
this.embedImage = function( val, callback )
Hack for Firefox bugs where text element features aren’t updated.
var ffClone = function( elem )
Return the document’s defs element, create it first if necessary
var findDefs = function()
Check if exact gradient already exists
var findDuplicateGradient = function( grad )
This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
c.finishUndoableChange = function()