diff --git a/docs/files/svgcanvas-js.html b/docs/files/svgcanvas-js.html index cc96ad99..b1ce4cae 100644 --- a/docs/files/svgcanvas-js.html +++ b/docs/files/svgcanvas-js.html @@ -11,37 +11,45 @@ if (browserType) {document.write("
svgcanvas.js | |
Functions | |
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. |
createLayer | This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it. |
deleteCurrentLayer | This function clears the selection and then deletes the current layer from the drawing. |
getNumLayers | This function returns the number of layers in the current drawing. |
getLayer | This function returns the name of the ith layer. |
getCurrentLayer | This function returns the name of the currently selected layer. |
setCurrentLayer | This function sets the current layer. |
renameCurrentLayer | This function renames the current layer. |
setCurrentLayerPosition | This function changes the position of the current layer to the new value. |
getLayerVisibility | This function returns whether the layer is visible. |
setLayerVisibility | This function sets the visibility of the layer. |
moveSelectedToLayer | This function moves the selected elements to layername. |
svgcanvas.js | |
Functions | |
clearSelection | Clears the selection. |
addToSelection | Adds a list of elements to the selection. |
removeFromSelection | Removes elements from the selection. |
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. |
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. |
clear | Clears the current document. |
this.setCurrentLayer = function( name )
This function 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.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 )
This function renames the current layer. This is an undo-able action. If the layer name is not valid (i.e. unique), then this function does nothing and returns false, otherwise it returns true.
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.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 )
This function changes the position of the current layer to the new value. This is an undo-able action. If the new index is not valid, this function does nothing and returns false, otherwise it returns true.
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.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 )
This function 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.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 )
This function sets the visibility of the layer. This is an undo-able action. If the layer name is not valid, this function return false, otherwise it returns true.
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.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 )
This function moves the selected elements to layername. This is an undo-able action. If the name is not a valid layer name, then false is returned. Otherwise it returns true.
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.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.
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
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 )
This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it.
this.createLayer = function( name )
This function clears the selection and then deletes the current layer from the drawing.
this.deleteCurrentLayer = function()
This function returns the number of layers in the current drawing.
this.getNumLayers = function()
This function returns the name of the ith layer.
this.getLayer = function( i )
This function returns the name of the currently selected layer.
this.getCurrentLayer = function()
This function sets the current layer.
this.setCurrentLayer = function( name )
This function renames the current layer.
this.renameCurrentLayer = function( newname )
This function changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function returns whether the layer is visible.
this.getLayerVisibility = function( layername )
This function sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Clears the selection.
this.clearSelection = function()
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()
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 )
Clears the current document.
this.clear = function()
S | |
svgcanvas-mine.js | |
svgcanvas.js |
S | |
svgcanvas.js |
This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it.
this.createLayer = function( name )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
This function clears the selection and then deletes the current layer from the drawing.
this.deleteCurrentLayer = function()
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function()
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 )
This function returns the name of the currently selected layer.
this.getCurrentLayer = function()
This function returns the name of the ith layer.
this.getLayer = function( i )
This function returns whether the layer is visible.
this.getLayerVisibility = function( layername )
This function returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
This function moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
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()
This function renames the current layer.
this.renameCurrentLayer = function( newname )
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()
This function sets the current layer.
this.setCurrentLayer = function( name )
This function changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function 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 )
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()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
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 )
C | |
createLayer | |
D | |
deleteCurrentLayer | |
F | |
Functions | |
G | |
getCurrentLayer | |
getLayer | |
getLayerVisibility | |
getNumLayers | |
getSvgString | |
M | |
moveSelectedToLayer | |
R | |
renameCurrentLayer | |
S | |
save | |
setCurrentLayer | |
setCurrentLayerPosition | |
setLayerVisibility | |
setSvgString | |
svgcanvas-mine.js | |
svgcanvas.js |
This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it.
this.createLayer = function( name )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
This function clears the selection and then deletes the current layer from the drawing.
this.deleteCurrentLayer = function()
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function()
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()
This function returns the name of the currently selected layer.
this.getCurrentLayer = function()
This function returns the name of the ith layer.
this.getLayer = function( i )
This function returns whether the layer is visible.
this.getLayerVisibility = function( layername )
This function 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 the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
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()
This function moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
This function renames the current layer.
this.renameCurrentLayer = function( newname )
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()
This function sets the current layer.
this.setCurrentLayer = function( name )
This function changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
This function 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()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
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 )