diff --git a/docs/files/svgcanvas-js.html b/docs/files/svgcanvas-js.html index 78b6f5a7..4efb28b0 100644 --- a/docs/files/svgcanvas-js.html +++ b/docs/files/svgcanvas-js.html @@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV -

SvgCanvas

The main SvgCanvas class that manages all SVG-related functions

Parameters

containerThe container HTML element that should hold the SVG root element
configAn object that contains configuration data
Summary
SvgCanvasThe main SvgCanvas class that manages all SVG-related functions
toXmlConverts characters in a string to XML-friendly entities.
fromXmlConverts XML entities in a string to single characters.
Undo/Redo history management
ChangeElementCommandHistory command to make a change to an element.
ChangeElementCommand.applyPerforms the stored change action
Selection
clearSelectionClears the selection.
addToSelectionAdds a list of elements to the selection.
removeFromSelectionRemoves elements from the selection.
Serialization
saveSerializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
getSvgStringReturns the current drawing as raw SVG XML text.
setSvgStringThis function sets the current drawing as the input SVG XML.
importSvgStringThis function imports the input SVG XML into the current layer in the drawing
Layers
createLayerCreates 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.
deleteCurrentLayerDeletes the current layer from the drawing and then clears the selection.
getNumLayersReturns the number of layers in the current drawing.
getLayerReturns the name of the ith layer.
getCurrentLayerReturns the name of the currently selected layer.
setCurrentLayerSets the current layer.
renameCurrentLayerRenames the current layer.
setCurrentLayerPositionChanges the position of the current layer to the new value.
getLayerVisibilityReturns whether the layer is visible.
setLayerVisibilitySets the visibility of the layer.
moveSelectedToLayerMoves the selected elements to layername.
getLayerOpacityReturns the opacity of the given layer.
setLayerOpacitySets the opacity of the given layer.
selectAllInCurrentLayerClears the selection, then adds all elements in the current layer to the selection.
clearClears the current document.
Fill and Stroke
getVersionReturns a string which describes the revision number of SvgCanvas.
+

SvgCanvas

The main SvgCanvas class that manages all SVG-related functions

Parameters

containerThe container HTML element that should hold the SVG root element
configAn object that contains configuration data
Summary
SvgCanvasThe main SvgCanvas class that manages all SVG-related functions
toXmlConverts characters in a string to XML-friendly entities.
fromXmlConverts XML entities in a string to single characters.
Undo/Redo history management
ChangeElementCommandHistory command to make a change to an element.
ChangeElementCommand.applyPerforms the stored change action
ChangeElementCommand.unapplyReverses the stored change action
ChangeElementCommand.elementsReturns array with element associated with this command
InsertElementCommandHistory command for an element that was added to the DOM
InsertElementCommand.applyRe-Inserts the new element
InsertElementCommand.unapplyRemoves the element
InsertElementCommand.elementsReturns array with element associated with this command
RemoveElementCommandHistory command for an element removed from the DOM
RemoveElementCommand.applyRe-removes the new element
RemoveElementCommand.unapplyRe-adds the new element
RemoveElementCommand.elementsReturns array with element associated with this command
MoveElementCommandHistory command for an element that had its DOM position changed
MoveElementCommand.unapplyRe-positions the element
MoveElementCommand.unapplyPositions the element back to its original location
InsertElementCommand.elementsReturns array with element associated with this command
Selection
clearSelectionClears the selection.
addToSelectionAdds a list of elements to the selection.
removeFromSelectionRemoves elements from the selection.
Serialization
saveSerializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
getSvgStringReturns the current drawing as raw SVG XML text.
setSvgStringThis function sets the current drawing as the input SVG XML.
importSvgStringThis function imports the input SVG XML into the current layer in the drawing
Layers
createLayerCreates 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.
deleteCurrentLayerDeletes the current layer from the drawing and then clears the selection.
getNumLayersReturns the number of layers in the current drawing.
getLayerReturns the name of the ith layer.
getCurrentLayerReturns the name of the currently selected layer.
setCurrentLayerSets the current layer.
renameCurrentLayerRenames the current layer.
setCurrentLayerPositionChanges the position of the current layer to the new value.
getLayerVisibilityReturns whether the layer is visible.
setLayerVisibilitySets the visibility of the layer.
moveSelectedToLayerMoves the selected elements to layername.
getLayerOpacityReturns the opacity of the given layer.
setLayerOpacitySets the opacity of the given layer.
selectAllInCurrentLayerClears the selection, then adds all elements in the current layer to the selection.
clearClears the current document.
Fill and Stroke
getVersionReturns a string which describes the revision number of SvgCanvas.

toXml

toXml = function(str)

Converts characters in a string to XML-friendly entities.

Example: “&” becomes “&” Parameters: str - The string to be converted Returns: The converted string

@@ -19,10 +19,38 @@ if (browserType) {document.write("
");if (browserV

Undo/Redo history management

-

ChangeElementCommand

function ChangeElementCommand(elem,
attrs,
text)

History command to make a change to an element.  Usually an attribute change, but can also be textcontent.

Parameters

elemThe DOM element to be changed
attrsAn object with the attributes to be changed and the values they had before the change
textAn optional string visible to user related to this change
+

ChangeElementCommand

function ChangeElementCommand(elem,
attrs,
text)

History command to make a change to an element.  Usually an attribute change, but can also be textcontent.

Parameters

elemThe DOM element that was changed
attrsAn object with the attributes to be changed and the values they had before the change
textAn optional string visible to user related to this change

ChangeElementCommand.apply

Performs the stored change action

+

ChangeElementCommand.unapply

Reverses the stored change action

+ +

ChangeElementCommand.elements

Returns array with element associated with this command

+ +

InsertElementCommand

function InsertElementCommand(elem,
text)

History command for an element that was added to the DOM

Parameters

elemThe newly added DOM element
textAn optional string visible to user related to this change
+ +

InsertElementCommand.apply

Re-Inserts the new element

+ +

InsertElementCommand.unapply

Removes the element

+ +

InsertElementCommand.elements

Returns array with element associated with this command

+ +

RemoveElementCommand

function RemoveElementCommand(elem,
parent,
text)

History command for an element removed from the DOM

Parameters

elemThe removed DOM element
elemThe DOM element’s parent
textAn optional string visible to user related to this change
+ +

RemoveElementCommand.apply

Re-removes the new element

+ +

RemoveElementCommand.unapply

Re-adds the new element

+ +

RemoveElementCommand.elements

Returns array with element associated with this command

+ +

MoveElementCommand

function MoveElementCommand(elem,
oldNextSibling,
oldParent,
text)

History command for an element that had its DOM position changed

Parameters

elemThe DOM element that was moved
oldNextSiblingThe element’s next sibling before it was moved
oldParentThe element’s parent before it was moved
textAn optional string visible to user related to this change
+ +

MoveElementCommand.unapply

Re-positions the element

+ +

MoveElementCommand.unapply

Positions the element back to its original location

+ +

InsertElementCommand.elements

Returns array with element associated with this command

+

Selection

clearSelection

this.clearSelection = function(noCall)

Clears the selection.  The ‘selected’ handler is then called.

@@ -90,7 +118,7 @@ var searchPanel = new SearchPanel("searchPanel", "HTML", "../search"); -
toXml = function(str)
Converts characters in a string to XML-friendly entities.
fromXml = function(str)
Converts XML entities in a string to single characters.
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
this.clearSelection = function(noCall)
Clears the selection.
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
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.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getLayer = function(i)
Returns the name of the ith layer.
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
this.setCurrentLayer = function(name)
Sets the current layer.
this.renameCurrentLayer = function(newname)
Renames the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
this.getLayerVisibility = function(layername)
Returns whether the layer is visible.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
this.getLayerOpacity = function(layername)
Returns the opacity of the given layer.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.clear = function()
Clears the current document.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
+
toXml = function(str)
Converts characters in a string to XML-friendly entities.
fromXml = function(str)
Converts XML entities in a string to single characters.
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
function InsertElementCommand(elem,
text)
History command for an element that was added to the DOM
function RemoveElementCommand(elem,
parent,
text)
History command for an element removed from the DOM
function MoveElementCommand(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
this.clearSelection = function(noCall)
Clears the selection.
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
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.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getLayer = function(i)
Returns the name of the ith layer.
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
this.setCurrentLayer = function(name)
Sets the current layer.
this.renameCurrentLayer = function(newname)
Renames the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
this.getLayerVisibility = function(layername)
Returns whether the layer is visible.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
this.getLayerOpacity = function(layername)
Returns the opacity of the given layer.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.clear = function()
Clears the current document.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
diff --git a/docs/index/Functions.html b/docs/index/Functions.html index c6a1b5ea..c46e7c7f 100644 --- a/docs/index/Functions.html +++ b/docs/index/Functions.html @@ -11,45 +11,53 @@ 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
A
 addToSelection, SvgCanvas
 apply, SvgCanvas.ChangeElementCommand
C
 ChangeElementCommand, SvgCanvas
 clear, SvgCanvas
 clearSelection, SvgCanvas
 createLayer, SvgCanvas
D
 deleteCurrentLayer, SvgCanvas
F
 fromXml, SvgCanvas
G
 getCurrentLayer, SvgCanvas
 getLayer, SvgCanvas
 getLayerOpacity, SvgCanvas
 getLayerVisibility, SvgCanvas
 getNumLayers, SvgCanvas
 getSvgString, SvgCanvas
 getVersion, SvgCanvas
I
 importSvgString, SvgCanvas
M
 moveSelectedToLayer, SvgCanvas
R
 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
+
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
 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
-
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Performs the stored change action
+
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
-
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
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.
+
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
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.deleteCurrentLayer = function()
Deletes the current layer from the drawing and then clears the selection.
-
fromXml = function(str)
Converts XML entities in a string to single characters.
+
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.getCurrentLayer = function()
Returns the name of the currently selected layer.
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.
this.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
+
fromXml = function(str)
Converts XML entities in a string to single characters.
-
This function imports the input SVG XML into the current layer in the drawing
+
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
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.
this.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
-
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
+
This function imports the input SVG XML into the current layer in the drawing
function InsertElementCommand(elem,
text)
History command for an element that was added to the DOM
-
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
+
function MoveElementCommand(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
-
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
function setForeignString(xmlString)
This function sets the content of element elt to the input XML.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
+
function RemoveElementCommand(elem,
parent,
text)
History command for an element removed from the DOM
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
-
toXml = function(str)
Converts characters in a string to XML-friendly entities.
+
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
function setForeignString(xmlString)
This function sets the content of element elt to the input XML.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
+ + + +
toXml = function(str)
Converts characters in a string to XML-friendly entities.
+ + + +
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
diff --git a/docs/index/General.html b/docs/index/General.html index 4939d6e6..fd553d0e 100644 --- a/docs/index/General.html +++ b/docs/index/General.html @@ -11,29 +11,33 @@ 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
A
 addToSelection, SvgCanvas
 apply, SvgCanvas.ChangeElementCommand
C
 ChangeElementCommand, SvgCanvas
 clear, SvgCanvas
 clearSelection, SvgCanvas
 createLayer, SvgCanvas
D
 deleteCurrentLayer, SvgCanvas
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
L
 Layers, SvgCanvas
M
 moveSelectedToLayer, SvgCanvas
R
 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
 Undo/Redo history management, SvgCanvas
+
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
 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/Redo history management, SvgCanvas
-
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Performs the stored change action
+
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
-
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
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.
+
function ChangeElementCommand(elem,
attrs,
text)
History command to make a change to an element.
this.clear = function()
Clears the current document.
this.clearSelection = function(noCall)
Clears the selection.
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.deleteCurrentLayer = function()
Deletes the current layer from the drawing and then clears the selection.
-
fromXml = function(str)
Converts XML entities in a string to single characters.
+
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.getCurrentLayer = function()
Returns the name of the currently selected layer.
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.
this.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
+
fromXml = function(str)
Converts XML entities in a string to single characters.
-
This function imports the input SVG XML into the current layer in the drawing
+
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
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.
this.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.getVersion = function()
Returns a string which describes the revision number of SvgCanvas.
+ + + +
This function imports the input SVG XML into the current layer in the drawing
function InsertElementCommand(elem,
text)
History command for an element that was added to the DOM
@@ -41,23 +45,23 @@ if (browserType) {document.write("
");if (browserV -
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
+
function MoveElementCommand(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
-
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
+
function RemoveElementCommand(elem,
parent,
text)
History command for an element removed from the DOM
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
-
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
function setForeignString(xmlString)
This function sets the content of element elt to the input XML.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
The main SvgCanvas class that manages all SVG-related functions
+
this.save = function(opts)
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.selectAllInCurrentLayer = function()
Clears the selection, then adds all elements in the current layer to the selection.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
function setForeignString(xmlString)
This function sets the content of element elt to the input XML.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
The main SvgCanvas class that manages all SVG-related functions
-
toXml = function(str)
Converts characters in a string to XML-friendly entities.
+
toXml = function(str)
Converts characters in a string to XML-friendly entities.
- +
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
diff --git a/docs/javascript/searchdata.js b/docs/javascript/searchdata.js index 27bb0708..c9700e49 100644 --- a/docs/javascript/searchdata.js +++ b/docs/javascript/searchdata.js @@ -36,7 +36,7 @@ var indexSectionsWithContent = { "B": false, "C": true, "D": true, - "E": false, + "E": true, "F": true, "G": true, "H": false, @@ -52,7 +52,7 @@ var indexSectionsWithContent = { "R": true, "S": true, "T": true, - "U": false, + "U": true, "V": false, "W": false, "X": false, diff --git a/docs/search/FunctionsA.html b/docs/search/FunctionsA.html index 1f8fa6d1..be1043ae 100644 --- a/docs/search/FunctionsA.html +++ b/docs/search/FunctionsA.html @@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV -
Loading...
addToSelection, SvgCanvas
apply, SvgCanvas.ChangeElementCommand
Searching...
No Matches