svgcanvas.js
Summary
| 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. |
@@ -27,20 +27,36 @@ if (browserType) {document.write("
");if (browserV
getNumLayers
| this.getNumLayers = function() |
This function returns the number of layers in the current drawing.
Returns
The number of layers in the current drawing.
+
getLayer
| this.getLayer = function( | i | ) |
|
This function returns the name of the ith layer. If the index is out of range, then an empty string is returned.
Parameters
| i | the zero-based index of the layer you are querying. |
Returns
The name of the ith layer
+
+
getCurrentLayer
| this.getCurrentLayer = function() |
This function returns the name of the currently selected layer. If an error occurs, an empty string is returned.
Returns
The name of the currently active layer.
+
+
setCurrentLayer
| 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.
Parameters
| name | the name of the layer you want to switch to. |
Returns
true if the current layer was switched, otherwise false
+
+
renameCurrentLayer
| 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.
Parameters
| newname | the new name you want to give the current layer. This name must be unique among all layer names. |
Returns
true if the rename succeeded, false otherwise.
+
+
setCurrentLayerPosition
| 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.
Parameters
| newpos | The zero-based index of the new position of the layer. This should be between |
| 0 and (number of layers | 1) |
Returns
true if the current layer position was changed, false otherwise.
+
+
getLayerVisibility
| this.getLayerVisibility = function( | layername | ) |
|
This function returns whether the layer is visible. If the layer name is not valid, then this function returns false.
Parameters
| layername | the name of the layer which you want to query. |
Returns
The visibility state of the layer, or false if the layer name was invalid.
+
+
setLayerVisibility
| 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.
Parameters
| layername | the name of the layer to change the visibility |
| bVisible | true/false, whether the layer should be visible |
Returns
true if the layer’s visibility was set, false otherwise
+
+
moveSelectedToLayer
| 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.
Parameters
| layername | the name of the layer you want to which you want to move the selected elements |
Returns
true if the selected elements were moved to the layer, false otherwise.
+
-
-
+
diff --git a/docs/index.html b/docs/index.html
index 635c3177..3aa33024 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/index/Files.html b/docs/index/Files.html
index 6be68e67..1a211415 100644
--- a/docs/index/Files.html
+++ b/docs/index/Files.html
@@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV
-
File 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
+
File 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
@@ -21,7 +21,7 @@ if (browserType) {document.write("
");if (browserV
-
diff --git a/docs/index/Functions.html b/docs/index/Functions.html
index 62f0e16f..28a7f9b0 100644
--- a/docs/index/Functions.html
+++ b/docs/index/Functions.html
@@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV
-
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
+
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
| C | |
| | createLayer |
| D | |
| | deleteCurrentLayer |
| G | |
| | getCurrentLayer |
| | getLayer |
| | getLayerVisibility |
| | getNumLayers |
| | getSvgString |
| M | |
| | moveSelectedToLayer |
| R | |
| | renameCurrentLayer |
| S | |
| | save |
| | setCurrentLayer |
| | setCurrentLayerPosition |
| | setLayerVisibility |
| | setSvgString |
@@ -21,11 +21,19 @@ if (browserType) {document.write("
");if (browserV
-
+
-
+
+
+
+
+
+
+
+
+
@@ -33,7 +41,7 @@ if (browserType) {document.write("
");if (browserV
-
diff --git a/docs/index/General.html b/docs/index/General.html
index 0487f1cf..3d4122df 100644
--- a/docs/index/General.html
+++ b/docs/index/General.html
@@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV
-
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
+
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
| 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 |
@@ -25,11 +25,19 @@ if (browserType) {document.write("
");if (browserV
-
+
-
+
+
+
+
+
+
+
+
+
@@ -37,7 +45,7 @@ if (browserType) {document.write("
");if (browserV
-
diff --git a/docs/javascript/searchdata.js b/docs/javascript/searchdata.js
index db70f28f..f0356f01 100644
--- a/docs/javascript/searchdata.js
+++ b/docs/javascript/searchdata.js
@@ -44,12 +44,12 @@ var indexSectionsWithContent = {
"J": false,
"K": false,
"L": false,
- "M": false,
+ "M": true,
"N": false,
"O": false,
"P": false,
"Q": false,
- "R": false,
+ "R": true,
"S": true,
"T": false,
"U": false,
diff --git a/docs/search/FilesS.html b/docs/search/FilesS.html
index a8c4e958..1f16b8b9 100644
--- a/docs/search/FilesS.html
+++ b/docs/search/FilesS.html
@@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV
-
Loading...
Searching...
No Matches