diff --git a/docs/files/svgcanvas-js.html b/docs/files/svgcanvas-js.html index 4efb28b0..9ea577f0 100644 --- a/docs/files/svgcanvas-js.html +++ b/docs/files/svgcanvas-js.html @@ -11,15 +11,15 @@ if (browserType) {document.write("
The main SvgCanvas class that manages all SVG-related functions
container | The container HTML element that should hold the SVG root element |
config | An object that contains configuration data |
SvgCanvas | The main SvgCanvas class that manages all SVG-related functions |
toXml | Converts characters in a string to XML-friendly entities. |
fromXml | Converts XML entities in a string to single characters. |
Undo/ | |
ChangeElementCommand | History command to make a change to an element. |
ChangeElementCommand. | Performs the stored change action |
ChangeElementCommand. | Reverses the stored change action |
ChangeElementCommand. | Returns array with element associated with this command |
InsertElementCommand | History command for an element that was added to the DOM |
InsertElementCommand. | Re-Inserts the new element |
InsertElementCommand. | Removes the element |
InsertElementCommand. | Returns array with element associated with this command |
RemoveElementCommand | History command for an element removed from the DOM |
RemoveElementCommand. | Re-removes the new element |
RemoveElementCommand. | Re-adds the new element |
RemoveElementCommand. | Returns array with element associated with this command |
MoveElementCommand | History command for an element that had its DOM position changed |
MoveElementCommand. | Re-positions the element |
MoveElementCommand. | Positions the element back to its original location |
InsertElementCommand. | Returns array with element associated with this command |
Selection | |
clearSelection | Clears the selection. |
addToSelection | Adds a list of elements to the selection. |
removeFromSelection | Removes elements from the selection. |
Serialization | |
save | Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. |
getSvgString | Returns the current drawing as raw SVG XML text. |
setSvgString | This function sets the current drawing as the input SVG XML. |
importSvgString | This function imports the input SVG XML into the current layer in the drawing |
Layers | |
createLayer | 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. |
deleteCurrentLayer | Deletes the current layer from the drawing and then clears the selection. |
getNumLayers | Returns the number of layers in the current drawing. |
getLayer | Returns the name of the ith layer. |
getCurrentLayer | Returns the name of the currently selected layer. |
setCurrentLayer | Sets the current layer. |
renameCurrentLayer | Renames the current layer. |
setCurrentLayerPosition | Changes the position of the current layer to the new value. |
getLayerVisibility | Returns whether the layer is visible. |
setLayerVisibility | Sets the visibility of the layer. |
moveSelectedToLayer | Moves the selected elements to layername. |
getLayerOpacity | Returns the opacity of the given layer. |
setLayerOpacity | Sets the opacity of the given layer. |
selectAllInCurrentLayer | Clears the selection, then adds all elements in the current layer to the selection. |
clear | Clears the current document. |
Fill and Stroke | |
getVersion | Returns a string which describes the revision number of SvgCanvas. |
The main SvgCanvas class that manages all SVG-related functions
container | The container HTML element that should hold the SVG root element |
config | An object that contains configuration data |
SvgCanvas | The main SvgCanvas class that manages all SVG-related functions |
toXml | Converts characters in a string to XML-friendly entities. |
fromXml | Converts XML entities in a string to single characters. |
Undo/ | |
ChangeElementCommand | History command to make a change to an element. |
ChangeElementCommand. | Performs the stored change action |
ChangeElementCommand. | Reverses the stored change action |
ChangeElementCommand. | Returns array with element associated with this command |
InsertElementCommand | History command for an element that was added to the DOM |
InsertElementCommand. | Re-Inserts the new element |
InsertElementCommand. | Removes the element |
InsertElementCommand. | Returns array with element associated with this command |
RemoveElementCommand | History command for an element removed from the DOM |
RemoveElementCommand. | Re-removes the new element |
RemoveElementCommand. | Re-adds the new element |
RemoveElementCommand. | Returns array with element associated with this command |
MoveElementCommand | History command for an element that had its DOM position changed |
MoveElementCommand. | Re-positions the element |
MoveElementCommand. | Positions the element back to its original location |
MoveElementCommand. | Returns array with element associated with this command |
BatchCommand | History command that can contain/execute multiple other commands |
BatchCommand. | Runs “apply” on all subcommands |
BatchCommand. | Runs “unapply” on all subcommands |
BatchCommand. | Iterate through all our subcommands and returns all the elements we are changing |
BatchCommand. | Adds a given command to the history stack |
BatchCommand. | Returns a boolean indicating whether or not the batch command is empty |
Selector | Private class for DOM element selection boxes |
Functions | |
Selector. | Used to reset the id and element that the selector is attached to |
Selector. | Show the resize grips of this selector |
Selector. | Updates cursors for corner grips on rotation so arrows point the right way |
Selector. | Updates the selector to match the element’s size |
SelectorManager | public class to manage all selector objects (selection boxes) |
SelectorManager. | Resets the parent selector group element |
SelectorManager. | Returns the selector based on the given element |
SelectorManager. | Removes the selector of the given element (hides selection box) |
SelectorManager. | Returns the rubberBandBox DOM element. |
Selection | |
clearSelection | Clears the selection. |
addToSelection | Adds a list of elements to the selection. |
removeFromSelection | Removes elements from the selection. |
Serialization | |
save | Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. |
getSvgString | Returns the current drawing as raw SVG XML text. |
setSvgString | This function sets the current drawing as the input SVG XML. |
importSvgString | This function imports the input SVG XML into the current layer in the drawing |
Layers | |
createLayer | 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. |
deleteCurrentLayer | Deletes the current layer from the drawing and then clears the selection. |
getNumLayers | Returns the number of layers in the current drawing. |
getLayer | Returns the name of the ith layer. |
getCurrentLayer | Returns the name of the currently selected layer. |
setCurrentLayer | Sets the current layer. |
renameCurrentLayer | Renames the current layer. |
setCurrentLayerPosition | Changes the position of the current layer to the new value. |
getLayerVisibility | Returns whether the layer is visible. |
setLayerVisibility | Sets the visibility of the layer. |
moveSelectedToLayer | Moves the selected elements to layername. |
getLayerOpacity | Returns the opacity of the given layer. |
setLayerOpacity | Sets the opacity of the given layer. |
selectAllInCurrentLayer | Clears the selection, then adds all elements in the current layer to the selection. |
clear | Clears the current document. |
Fill and Stroke | |
getVersion | Returns a string which describes the revision number of SvgCanvas. |
function ChangeElementCommand( elem, attrs, text )
History command to make a change to an element. Usually an attribute change, but can also be textcontent.
elem | The DOM element that was changed |
attrs | An object with the attributes to be changed and the values they had before the change |
text | An optional string visible to user related to this change |
var ChangeElementCommand = this.undoCmd.changeElement = function( elem, attrs, text )
History command to make a change to an element. Usually an attribute change, but can also be textcontent.
elem | The DOM element that was changed |
attrs | An object with the attributes to be changed and the values they had before the change |
text | An optional string visible to user related to this change |
function MoveElementCommand( elem, oldNextSibling, oldParent, text )
History command for an element that had its DOM position changed
elem | The DOM element that was moved |
oldNextSibling | The element’s next sibling before it was moved |
oldParent | The element’s parent before it was moved |
text | An optional string visible to user related to this change |
var MoveElementCommand = this.undoCmd.moveElement = function( elem, oldNextSibling, oldParent, text )
History command for an element that had its DOM position changed
elem | The DOM element that was moved |
oldNextSibling | The element’s next sibling before it was moved |
oldParent | The element’s parent before it was moved |
text | An optional string visible to user related to this change |
Private class for DOM element selection boxes
id | integer to internally indentify the selector |
elem | DOM element associated with this selector |
Functions | |
Selector. | Used to reset the id and element that the selector is attached to |
Selector. | Show the resize grips of this selector |
Selector. | Updates cursors for corner grips on rotation so arrows point the right way |
Selector. | Updates the selector to match the element’s size |
public class to manage all selector objects (selection boxes)
SelectorManager. | Resets the parent selector group element |
SelectorManager. | Returns the selector based on the given element |
SelectorManager. | Removes the selector of the given element (hides selection box) |
SelectorManager. | Returns the rubberBandBox DOM element. |
Selection | |
clearSelection | Clears the selection. |
addToSelection | Adds a list of elements to the selection. |
removeFromSelection | Removes elements from the selection. |
Serialization | |
save | Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. |
getSvgString | Returns the current drawing as raw SVG XML text. |
setSvgString | This function sets the current drawing as the input SVG XML. |
importSvgString | This function imports the input SVG XML into the current layer in the drawing |
Layers | |
createLayer | 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. |
deleteCurrentLayer | Deletes the current layer from the drawing and then clears the selection. |
getNumLayers | Returns the number of layers in the current drawing. |
getLayer | Returns the name of the ith layer. |
getCurrentLayer | Returns the name of the currently selected layer. |
setCurrentLayer | Sets the current layer. |
renameCurrentLayer | Renames the current layer. |
setCurrentLayerPosition | Changes the position of the current layer to the new value. |
getLayerVisibility | Returns whether the layer is visible. |
setLayerVisibility | Sets the visibility of the layer. |
moveSelectedToLayer | Moves the selected elements to layername. |
getLayerOpacity | Returns the opacity of the given layer. |
setLayerOpacity | Sets the opacity of the given layer. |
selectAllInCurrentLayer | Clears the selection, then adds all elements in the current layer to the selection. |
clear | Clears the current document. |
Fill and Stroke | |
getVersion | Returns a string which describes the revision number of SvgCanvas. |
this.setCurrentLayer = function( name )
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.
name | the name of the layer you want to switch to. |
true if the current layer was switched, otherwise false
this.renameCurrentLayer = function( newname )
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.
newname | the new name you want to give the current layer. This name must be unique among all layer names. |
true if the rename succeeded, false otherwise.
this.setCurrentLayerPosition = function( newpos )
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.
newpos | The zero-based index of the new position of the layer. This should be between |
0 and (number of layers | 1) |
true if the current layer position was changed, false otherwise.
this.getLayerVisibility = function( layername )
Returns whether the layer is visible. If the layer name is not valid, then this function returns false.
layername | the name of the layer which you want to query. |
The visibility state of the layer, or false if the layer name was invalid.
this.setLayerVisibility = function( layername, bVisible )
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.
layername | the name of the layer to change the visibility |
bVisible | true/false, whether the layer should be visible |
true if the layer’s visibility was set, false otherwise
this.moveSelectedToLayer = function( layername )
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.
layername | the name of the layer you want to which you want to move the selected elements |
true if the selected elements were moved to the layer, false otherwise.
this.getLayerOpacity = function( layername )
Returns the opacity of the given layer. If the input name is not a layer, null is returned.
layername | name of the layer on which to get the opacity |
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
this.setLayerOpacity = function( layername, opacity )
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.
layername | name of the layer on which to set the opacity |
opacity | a float value in the range 0.0-1.0 |
this.setCurrentLayer = function( name )
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.
name | the name of the layer you want to switch to. |
true if the current layer was switched, otherwise false
this.renameCurrentLayer = function( newname )
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.
newname | the new name you want to give the current layer. This name must be unique among all layer names. |
true if the rename succeeded, false otherwise.
this.setCurrentLayerPosition = function( newpos )
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.
newpos | The zero-based index of the new position of the layer. This should be between |
0 and (number of layers | 1) |
true if the current layer position was changed, false otherwise.
this.getLayerVisibility = function( layername )
Returns whether the layer is visible. If the layer name is not valid, then this function returns false.
layername | the name of the layer which you want to query. |
The visibility state of the layer, or false if the layer name was invalid.
this.setLayerVisibility = function( layername, bVisible )
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.
layername | the name of the layer to change the visibility |
bVisible | true/false, whether the layer should be visible |
true if the layer’s visibility was set, false otherwise
this.moveSelectedToLayer = function( layername )
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.
layername | the name of the layer you want to which you want to move the selected elements |
true if the selected elements were moved to the layer, false otherwise.
this.getLayerOpacity = function( layername )
Returns the opacity of the given layer. If the input name is not a layer, null is returned.
layername | name of the layer on which to get the opacity |
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
this.setLayerOpacity = function( layername, opacity )
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.
layername | name of the layer on which to set the opacity |
opacity | a float value in the range 0.0-1.0 |
Converts characters in a string to XML-friendly entities.
toXml = function( str )
Converts XML entities in a string to single characters.
fromXml = function( str )
History command to make a change to an element.
function ChangeElementCommand( elem, attrs, text )
History command for an element that was added to the DOM
function InsertElementCommand( elem, text )
History command for an element removed from the DOM
function RemoveElementCommand( elem, parent, text )
History command for an element that had its DOM position changed
function MoveElementCommand( elem, oldNextSibling, oldParent, text )
Clears the selection.
this.clearSelection = function( noCall )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
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 )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Clears the current document.
this.clear = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
Converts characters in a string to XML-friendly entities.
toXml = function( str )
Converts XML entities in a string to single characters.
fromXml = function( str )
History command to make a change to an element.
var ChangeElementCommand = this.undoCmd.changeElement = function( elem, attrs, text )
History command for an element that was added to the DOM
var InsertElementCommand = this.undoCmd.insertElement = function( elem, text )
History command for an element removed from the DOM
var RemoveElementCommand = this.undoCmd.removeElement = function( elem, parent, text )
History command for an element that had its DOM position changed
var MoveElementCommand = this.undoCmd.moveElement = function( elem, oldNextSibling, oldParent, text )
History command that can contain/execute multiple other commands
var BatchCommand = this.undoCmd.batch = function( text )
Clears the selection.
this.clearSelection = function( noCall )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
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 )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Clears the current document.
this.clear = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
A | |
addToSelection, SvgCanvas | |
apply | |
C | |
ChangeElementCommand, SvgCanvas | |
clear, SvgCanvas | |
clearSelection, SvgCanvas | |
createLayer, SvgCanvas | |
D | |
deleteCurrentLayer, SvgCanvas | |
E | |
elements | |
F | |
fromXml, SvgCanvas | |
G | |
getCurrentLayer, SvgCanvas | |
getLayer, SvgCanvas | |
getLayerOpacity, SvgCanvas | |
getLayerVisibility, SvgCanvas | |
getNumLayers, SvgCanvas | |
getSvgString, SvgCanvas | |
getVersion, SvgCanvas | |
I | |
importSvgString, SvgCanvas | |
InsertElementCommand, SvgCanvas | |
M | |
MoveElementCommand, SvgCanvas | |
moveSelectedToLayer, SvgCanvas | |
R | |
RemoveElementCommand, SvgCanvas | |
removeFromSelection, SvgCanvas | |
renameCurrentLayer, SvgCanvas | |
S | |
save, SvgCanvas | |
selectAllInCurrentLayer, SvgCanvas | |
setCurrentLayer, SvgCanvas | |
setCurrentLayerPosition, SvgCanvas | |
setForeignString(xmlString,elt) | |
setLayerOpacity, SvgCanvas | |
setLayerVisibility, SvgCanvas | |
setSvgString, SvgCanvas | |
T | |
toXml, SvgCanvas | |
U | |
unapply |
A | |
addSubCommand, SvgCanvas. | |
addToSelection, SelectorManager | |
apply | |
B | |
BatchCommand, SvgCanvas | |
C | |
ChangeElementCommand, SvgCanvas | |
clear, SelectorManager | |
clearSelection, SelectorManager | |
createLayer, SelectorManager | |
D | |
deleteCurrentLayer, SelectorManager | |
E | |
elements | |
F | |
fromXml, SvgCanvas | |
G | |
getCurrentLayer, SelectorManager | |
getLayer, SelectorManager | |
getLayerOpacity, SelectorManager | |
getLayerVisibility, SelectorManager | |
getNumLayers, SelectorManager | |
getRubberBandBox, SelectorManager. | |
getSvgString, SelectorManager | |
getVersion, SelectorManager | |
I | |
importSvgString, SelectorManager | |
initGroup, SelectorManager. | |
InsertElementCommand, SvgCanvas | |
isEmpty, SvgCanvas. | |
M | |
MoveElementCommand, SvgCanvas | |
moveSelectedToLayer, SelectorManager | |
R | |
releaseSelector, SelectorManager. | |
RemoveElementCommand, SvgCanvas | |
removeFromSelection, SelectorManager | |
renameCurrentLayer, SelectorManager | |
requestSelector, SelectorManager. | |
reset, Selector. | |
resize, Selector. | |
S | |
save, SelectorManager | |
selectAllInCurrentLayer, SelectorManager | |
setCurrentLayer, SelectorManager | |
setCurrentLayerPosition, SelectorManager | |
setForeignString(xmlString,elt) | |
setLayerOpacity, SelectorManager | |
setLayerVisibility, SelectorManager | |
setSvgString, SelectorManager | |
showGrips, Selector. | |
T | |
toXml, SvgCanvas | |
U | |
unapply | |
updateGripCursors, Selector. |
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
History command to make a change to an element.
function ChangeElementCommand( elem, attrs, text )
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function( noCall )
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 )
History command that can contain/execute multiple other commands
var BatchCommand = this.undoCmd.batch = function( text )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
History command to make a change to an element.
var ChangeElementCommand = this.undoCmd.changeElement = function( elem, attrs, text )
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function( noCall )
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 )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Converts XML entities in a string to single characters.
fromXml = function( str )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
Converts XML entities in a string to single characters.
fromXml = function( str )
History command for an element that was added to the DOM
function InsertElementCommand( elem, text )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
History command for an element that had its DOM position changed
function MoveElementCommand( elem, oldNextSibling, oldParent, text )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
History command for an element that was added to the DOM
var InsertElementCommand = this.undoCmd.insertElement = function( elem, text )
History command for an element removed from the DOM
function RemoveElementCommand( elem, parent, text )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
History command for an element that had its DOM position changed
var MoveElementCommand = this.undoCmd.moveElement = function( elem, oldNextSibling, oldParent, text )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function sets the content of element elt to the input XML.
function setForeignString( xmlString )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
History command for an element removed from the DOM
var RemoveElementCommand = this.undoCmd.removeElement = function( elem, parent, text )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Converts characters in a string to XML-friendly entities.
toXml = function( str )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function sets the content of element elt to the input XML.
function setForeignString( xmlString )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Converts characters in a string to XML-friendly entities.
toXml = function( str )
A | |
addToSelection, SvgCanvas | |
apply | |
C | |
ChangeElementCommand, SvgCanvas | |
clear, SvgCanvas | |
clearSelection, SvgCanvas | |
createLayer, SvgCanvas | |
D | |
deleteCurrentLayer, SvgCanvas | |
E | |
elements | |
F | |
Fill and Stroke, SvgCanvas | |
fromXml, SvgCanvas | |
G | |
getCurrentLayer, SvgCanvas | |
getLayer, SvgCanvas | |
getLayerOpacity, SvgCanvas | |
getLayerVisibility, SvgCanvas | |
getNumLayers, SvgCanvas | |
getSvgString, SvgCanvas | |
getVersion, SvgCanvas | |
I | |
importSvgString, SvgCanvas | |
InsertElementCommand, SvgCanvas | |
L | |
Layers, SvgCanvas | |
M | |
MoveElementCommand, SvgCanvas | |
moveSelectedToLayer, SvgCanvas | |
R | |
RemoveElementCommand, SvgCanvas | |
removeFromSelection, SvgCanvas | |
renameCurrentLayer, SvgCanvas | |
S | |
save, SvgCanvas | |
selectAllInCurrentLayer, SvgCanvas | |
Selection, SvgCanvas | |
Serialization, SvgCanvas | |
setCurrentLayer, SvgCanvas | |
setCurrentLayerPosition, SvgCanvas | |
setForeignString(xmlString,elt) | |
setLayerOpacity, SvgCanvas | |
setLayerVisibility, SvgCanvas | |
setSvgString, SvgCanvas | |
SvgCanvas | |
T | |
toXml, SvgCanvas | |
U | |
unapply | |
Undo/ |
A | |
addSubCommand, SvgCanvas. | |
addToSelection, SelectorManager | |
apply | |
B | |
BatchCommand, SvgCanvas | |
C | |
ChangeElementCommand, SvgCanvas | |
clear, SelectorManager | |
clearSelection, SelectorManager | |
createLayer, SelectorManager | |
D | |
deleteCurrentLayer, SelectorManager | |
E | |
elements | |
F | |
Fill and Stroke, SelectorManager | |
fromXml, SvgCanvas | |
Functions, Selector | |
G | |
getCurrentLayer, SelectorManager | |
getLayer, SelectorManager | |
getLayerOpacity, SelectorManager | |
getLayerVisibility, SelectorManager | |
getNumLayers, SelectorManager | |
getRubberBandBox, SelectorManager. | |
getSvgString, SelectorManager | |
getVersion, SelectorManager | |
I | |
importSvgString, SelectorManager | |
initGroup, SelectorManager. | |
InsertElementCommand, SvgCanvas | |
isEmpty, SvgCanvas. | |
L | |
Layers, SelectorManager | |
M | |
MoveElementCommand, SvgCanvas | |
moveSelectedToLayer, SelectorManager | |
R | |
releaseSelector, SelectorManager. | |
RemoveElementCommand, SvgCanvas | |
removeFromSelection, SelectorManager | |
renameCurrentLayer, SelectorManager | |
requestSelector, SelectorManager. | |
reset, Selector. | |
resize, Selector. | |
S | |
save, SelectorManager | |
selectAllInCurrentLayer, SelectorManager | |
Selection, SelectorManager | |
Selector | |
SelectorManager | |
Serialization, SelectorManager | |
setCurrentLayer, SelectorManager | |
setCurrentLayerPosition, SelectorManager | |
setForeignString(xmlString,elt) | |
setLayerOpacity, SelectorManager | |
setLayerVisibility, SelectorManager | |
setSvgString, SelectorManager | |
showGrips, Selector. | |
SvgCanvas | |
T | |
toXml, SvgCanvas | |
U | |
unapply | |
Undo/ | |
updateGripCursors, Selector. |
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
History command to make a change to an element.
function ChangeElementCommand( elem, attrs, text )
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function( noCall )
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 )
History command that can contain/execute multiple other commands
var BatchCommand = this.undoCmd.batch = function( text )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
History command to make a change to an element.
var ChangeElementCommand = this.undoCmd.changeElement = function( elem, attrs, text )
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function( noCall )
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 )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Converts XML entities in a string to single characters.
fromXml = function( str )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
Converts XML entities in a string to single characters.
fromXml = function( str )
History command for an element that was added to the DOM
function InsertElementCommand( elem, text )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns a string which describes the revision number of SvgCanvas.
this.getVersion = function()
History command for an element that was added to the DOM
var InsertElementCommand = this.undoCmd.insertElement = function( elem, text )
History command for an element that had its DOM position changed
function MoveElementCommand( elem, oldNextSibling, oldParent, text )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
History command for an element that had its DOM position changed
var MoveElementCommand = this.undoCmd.moveElement = function( elem, oldNextSibling, oldParent, text )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
History command for an element removed from the DOM
function RemoveElementCommand( elem, parent, text )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
History command for an element removed from the DOM
var RemoveElementCommand = this.undoCmd.removeElement = function( elem, parent, text )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function sets the content of element elt to the input XML.
function setForeignString( xmlString )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function( opts )
Clears the selection, then adds all elements in the current layer to the selection.
this.selectAllInCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function sets the content of element elt to the input XML.
function setForeignString( xmlString )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Converts characters in a string to XML-friendly entities.
toXml = function( str )
Converts characters in a string to XML-friendly entities.
toXml = function( str )