From 93b509dd8efcf2bba8ec13560fa75d37a07410bb Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 21 Jun 2010 18:06:21 +0000 Subject: [PATCH] Reorganized undo related functions, added more docs, updated German lang file git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1612 eee81c28-f429-11dd-99c0-75d572ba1ddd --- docs/files/svgcanvas-js.html | 30 +- docs/index.html | 2 +- docs/index/Functions.html | 28 +- docs/index/General.html | 28 +- docs/search/FunctionsA.html | 2 +- docs/search/FunctionsG.html | 2 +- docs/search/FunctionsR.html | 2 +- docs/search/GeneralA.html | 2 +- docs/search/GeneralF.html | 2 +- docs/search/GeneralG.html | 2 +- docs/search/GeneralR.html | 2 +- editor/locale/lang.de.js | 52 +- editor/svg-editor.js | 17 +- editor/svgcanvas.js | 1094 ++++++++++++++++++---------------- 14 files changed, 669 insertions(+), 596 deletions(-) diff --git a/docs/files/svgcanvas-js.html b/docs/files/svgcanvas-js.html index 9ea577f0..b8d56a85 100644 --- a/docs/files/svgcanvas-js.html +++ b/docs/files/svgcanvas-js.html @@ -11,11 +11,11 @@ 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
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
MoveElementCommand.elementsReturns array with element associated with this command
BatchCommandHistory command that can contain/execute multiple other commands
BatchCommand.applyRuns “apply” on all subcommands
BatchCommand.unapplyRuns “unapply” on all subcommands
BatchCommand.elementsIterate through all our subcommands and returns all the elements we are changing
BatchCommand.addSubCommandAdds a given command to the history stack
BatchCommand.isEmptyReturns a boolean indicating whether or not the batch command is empty
SelectorPrivate class for DOM element selection boxes
Functions
Selector.resetUsed to reset the id and element that the selector is attached to
Selector.showGripsShow the resize grips of this selector
Selector.updateGripCursorsUpdates cursors for corner grips on rotation so arrows point the right way
Selector.resizeUpdates the selector to match the element’s size
SelectorManagerpublic class to manage all selector objects (selection boxes)
SelectorManager.initGroupResets the parent selector group element
SelectorManager.requestSelectorReturns the selector based on the given element
SelectorManager.releaseSelectorRemoves the selector of the given element (hides selection box)
SelectorManager.getRubberBandBoxReturns the rubberBandBox DOM element.
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
MoveElementCommand.elementsReturns array with element associated with this command
BatchCommandHistory command that can contain/execute multiple other commands
BatchCommand.applyRuns “apply” on all subcommands
BatchCommand.unapplyRuns “unapply” on all subcommands
BatchCommand.elementsIterate through all our subcommands and returns all the elements we are changing
BatchCommand.addSubCommandAdds a given command to the history stack
BatchCommand.isEmptyReturns a boolean indicating whether or not the batch command is empty
resetUndoStackResets the undo stack, effectively clearing the undo/redo history
undoMgr.getUndoStackSizeInteger with the current size of the undo history stack
undoMgr.getRedoStackSizeInteger with the current size of the redo history stack
undoMgr.getNextUndoCommandTextString associated with the next undo command
undoMgr.getNextRedoCommandTextString associated with the next redo command
undoMgr.undoPerforms an undo step
undoMgr.redoPerforms a redo step
addCommandToHistoryAdds a command object to the undo history stack
beginUndoableChangeThis function tells the canvas to remember the old values of the attrName attribute for each element sent in.
finishUndoableChangeThis function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
SelectorPrivate class for DOM element selection boxes
Functions
Selector.resetUsed to reset the id and element that the selector is attached to
Selector.showGripsShow the resize grips of this selector
Selector.updateGripCursorsUpdates cursors for corner grips on rotation so arrows point the right way
Selector.resizeUpdates the selector to match the element’s size
SelectorManagerpublic class to manage all selector objects (selection boxes)
SelectorManager.initGroupResets the parent selector group element
SelectorManager.requestSelectorReturns the selector based on the given element
SelectorManager.releaseSelectorRemoves the selector of the given element (hides selection box)
SelectorManager.getRubberBandBoxReturns the rubberBandBox DOM element.
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

strThe string to be converted Returns: The converted string
+

toXml

toXml = function(str)

Converts characters in a string to XML-friendly entities.

Example: “&” becomes “&”

Parameters

strThe string to be converted

Returns

The converted string

-

fromXml

fromXml = function(str)

Converts XML entities in a string to single characters.  Example: “&” becomes “&”

Parameters

strThe string to be converted Returns: The converted string
+

fromXml

fromXml = function(str)

Converts XML entities in a string to single characters.  Example: “&” becomes “&”

Parameters

strThe string to be converted

Returns

The converted string

Undo/Redo history management

@@ -63,6 +63,26 @@ if (browserType) {document.write("
");if (browserV

BatchCommand.isEmpty

Returns a boolean indicating whether or not the batch command is empty

+

resetUndoStack

resetUndoStack = function()

Resets the undo stack, effectively clearing the undo/redo history

+ +

undoMgr.getUndoStackSize

Returns

Integer with the current size of the undo history stack

+ +

undoMgr.getRedoStackSize

Returns

Integer with the current size of the redo history stack

+ +

undoMgr.getNextUndoCommandText

Returns

String associated with the next undo command

+ +

undoMgr.getNextRedoCommandText

Returns

String associated with the next redo command

+ +

undoMgr.undo

Performs an undo step

+ +

undoMgr.redo

Performs a redo step

+ +

addCommandToHistory

addCommandToHistory = c.undoCmd.add = function(cmd)

Adds a command object to the undo history stack

Parameters

cmdThe command object to add
+ +

beginUndoableChange

c.beginUndoableChange = function(attrName,
elems)

This function tells the canvas to remember the old values of the attrName attribute for each element sent in.  The elements and values are stored on a stack, so the next call to finishUndoableChange() will pop the elements and old values off the stack, gets the current values from the DOM and uses all of these to construct the undo-able command.

Parameters

attrNameThe name of the attribute being changed
elemsArray of DOM elements being changed
+ +

finishUndoableChange

c.finishUndoableChange = function()

This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.  The command can then be added to the command history

Returns

Batch command object with resulting changes

+

Selector

Private class for DOM element selection boxes

Parameters

idinteger to internally indentify the selector
elemDOM element associated with this selector
Summary
Functions
Selector.resetUsed to reset the id and element that the selector is attached to
Selector.showGripsShow the resize grips of this selector
Selector.updateGripCursorsUpdates cursors for corner grips on rotation so arrows point the right way
Selector.resizeUpdates the selector to match the element’s size

Functions

@@ -75,7 +95,7 @@ if (browserType) {document.write("
");if (browserV

Selector.resize

Updates the selector to match the element’s size

-

SelectorManager

public class to manage all selector objects (selection boxes)

Summary
SelectorManager.initGroupResets the parent selector group element
SelectorManager.requestSelectorReturns the selector based on the given element
SelectorManager.releaseSelectorRemoves the selector of the given element (hides selection box)
SelectorManager.getRubberBandBoxReturns the rubberBandBox DOM element.
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.
+

SelectorManager

public class to manage all selector objects (selection boxes)

Summary
SelectorManager.initGroupResets the parent selector group element
SelectorManager.requestSelectorReturns the selector based on the given element
SelectorManager.releaseSelectorRemoves the selector of the given element (hides selection box)
SelectorManager.getRubberBandBoxReturns the rubberBandBox DOM element.
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.

SelectorManager.initGroup

Resets the parent selector group element

@@ -152,7 +172,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.
var ChangeElementCommand = this.undoCmd.changeElement = function(elem,
attrs,
text)
History command to make a change to an element.
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
var RemoveElementCommand = this.undoCmd.removeElement = function(elem,
parent,
text)
History command for an element removed from the DOM
var MoveElementCommand = this.undoCmd.moveElement = function(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
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.
var ChangeElementCommand = this.undoCmd.changeElement = function(elem,
attrs,
text)
History command to make a change to an element.
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
var RemoveElementCommand = this.undoCmd.removeElement = function(elem,
parent,
text)
History command for an element removed from the DOM
var MoveElementCommand = this.undoCmd.moveElement = function(elem,
oldNextSibling,
oldParent,
text)
History command for an element that had its DOM position changed
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
resetUndoStack = function()
Resets the undo stack, effectively clearing the undo/redo history
addCommandToHistory = c.undoCmd.add = function(cmd)
Adds a command object to the undo history stack
c.beginUndoableChange = function(attrName,
elems)
This function tells the canvas to remember the old values of the attrName attribute for each element sent in.
c.finishUndoableChange = function()
This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
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.html b/docs/index.html index 635c3177..7e81af5e 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/Functions.html b/docs/index/Functions.html index b4d91d93..0be38b96 100644 --- a/docs/index/Functions.html +++ b/docs/index/Functions.html @@ -11,57 +11,57 @@ 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
 addSubCommand, SvgCanvas.BatchCommand
 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.SelectorManager
 getSvgString, SelectorManager
 getVersion, SelectorManager
I
 importSvgString, SelectorManager
 initGroup, SelectorManager.SelectorManager
 InsertElementCommand, SvgCanvas
 isEmpty, SvgCanvas.BatchCommand
M
 MoveElementCommand, SvgCanvas
 moveSelectedToLayer, SelectorManager
R
 releaseSelector, SelectorManager.SelectorManager
 RemoveElementCommand, SvgCanvas
 removeFromSelection, SelectorManager
 renameCurrentLayer, SelectorManager
 requestSelector, SelectorManager.SelectorManager
 reset, Selector.Selector
 resize, Selector.Selector
S
 save, SelectorManager
 selectAllInCurrentLayer, SelectorManager
 setCurrentLayer, SelectorManager
 setCurrentLayerPosition, SelectorManager
 setForeignString(xmlString,elt)
 setLayerOpacity, SelectorManager
 setLayerVisibility, SelectorManager
 setSvgString, SelectorManager
 showGrips, Selector.Selector
T
 toXml, SvgCanvas
U
 unapply
 updateGripCursors, Selector.Selector
+
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
 addCommandToHistory, SvgCanvas
 addSubCommand, SvgCanvas.BatchCommand
 addToSelection, SelectorManager
 apply
B
 BatchCommand, SvgCanvas
 beginUndoableChange, SvgCanvas
C
 ChangeElementCommand, SvgCanvas
 clear, SelectorManager
 clearSelection, SelectorManager
 createLayer, SelectorManager
D
 deleteCurrentLayer, SelectorManager
E
 elements
F
 finishUndoableChange, SvgCanvas
 fromXml, SvgCanvas
G
 getCurrentLayer, SelectorManager
 getLayer, SelectorManager
 getLayerOpacity, SelectorManager
 getLayerVisibility, SelectorManager
 getNextRedoCommandText, SvgCanvas.undoMgr
 getNextUndoCommandText, SvgCanvas.undoMgr
 getNumLayers, SelectorManager
 getRedoStackSize, SvgCanvas.undoMgr
 getRubberBandBox, SelectorManager.SelectorManager
 getSvgString, SelectorManager
 getUndoStackSize, SvgCanvas.undoMgr
 getVersion, SelectorManager
I
 importSvgString, SelectorManager
 initGroup, SelectorManager.SelectorManager
 InsertElementCommand, SvgCanvas
 isEmpty, SvgCanvas.BatchCommand
M
 MoveElementCommand, SvgCanvas
 moveSelectedToLayer, SelectorManager
R
 redo, SvgCanvas.undoMgr
 releaseSelector, SelectorManager.SelectorManager
 RemoveElementCommand, SvgCanvas
 removeFromSelection, SelectorManager
 renameCurrentLayer, SelectorManager
 requestSelector, SelectorManager.SelectorManager
 reset, Selector.Selector
 resetUndoStack, SvgCanvas
 resize, Selector.Selector
S
 save, SelectorManager
 selectAllInCurrentLayer, SelectorManager
 setCurrentLayer, SelectorManager
 setCurrentLayerPosition, SelectorManager
 setForeignString(xmlString,elt)
 setLayerOpacity, SelectorManager
 setLayerVisibility, SelectorManager
 setSvgString, SelectorManager
 showGrips, Selector.Selector
T
 toXml, SvgCanvas
U
 unapply
 undo, SvgCanvas.undoMgr
 updateGripCursors, Selector.Selector
-
Adds a given command to the history stack
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Runs “apply” on all subcommands
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
+
addCommandToHistory = c.undoCmd.add = function(cmd)
Adds a command object to the undo history stack
Adds a given command to the history stack
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Runs “apply” on all subcommands
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
-
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
+
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
c.beginUndoableChange = function(attrName,
elems)
This function tells the canvas to remember the old values of the attrName attribute for each element sent in.
-
var ChangeElementCommand = this.undoCmd.changeElement = function(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.
+
var ChangeElementCommand = this.undoCmd.changeElement = function(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.
-
Iterate through all our subcommands and returns all the elements we are changing
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
+
Iterate through all our subcommands and returns all the elements we are changing
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
-
fromXml = function(str)
Converts XML entities in a string to single characters.
+
c.finishUndoableChange = function()
This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
fromXml = function(str)
Converts XML entities in a string to single characters.
-
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.
Returns the rubberBandBox DOM element.
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.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.
String associated with the next redo command
String associated with the next undo command
this.getNumLayers = function()
Returns the number of layers in the current drawing.
Integer with the current size of the redo history stack
Returns the rubberBandBox DOM element.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
Integer with the current size of the undo history stack
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
Resets the parent selector group element
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
Returns a boolean indicating whether or not the batch command is empty
+
This function imports the input SVG XML into the current layer in the drawing
Resets the parent selector group element
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
Returns a boolean indicating whether or not the batch command is empty
-
var MoveElementCommand = this.undoCmd.moveElement = function(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.
+
var MoveElementCommand = this.undoCmd.moveElement = function(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.
-
Removes the selector of the given element (hides selection box)
var RemoveElementCommand = this.undoCmd.removeElement = function(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.
Returns the selector based on the given element
Used to reset the id and element that the selector is attached to
Updates the selector to match the element’s size
+
Performs a redo step
Removes the selector of the given element (hides selection box)
var RemoveElementCommand = this.undoCmd.removeElement = function(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.
Returns the selector based on the given element
Used to reset the id and element that the selector is attached to
resetUndoStack = function()
Resets the undo stack, effectively clearing the undo/redo history
Updates the selector to match the element’s size
-
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.
Show the resize grips of this selector
+
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.
Show the resize grips of this selector
-
toXml = function(str)
Converts characters in a string to XML-friendly entities.
+
toXml = function(str)
Converts characters in a string to XML-friendly entities.
-
Runs “unapply” on all subcommands
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
Updates cursors for corner grips on rotation so arrows point the right way
+
Runs “unapply” on all subcommands
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
Performs an undo step
Updates cursors for corner grips on rotation so arrows point the right way
diff --git a/docs/index/General.html b/docs/index/General.html index 3ffb0365..1c764945 100644 --- a/docs/index/General.html +++ b/docs/index/General.html @@ -11,37 +11,37 @@ 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
 addSubCommand, SvgCanvas.BatchCommand
 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.SelectorManager
 getSvgString, SelectorManager
 getVersion, SelectorManager
I
 importSvgString, SelectorManager
 initGroup, SelectorManager.SelectorManager
 InsertElementCommand, SvgCanvas
 isEmpty, SvgCanvas.BatchCommand
L
 Layers, SelectorManager
M
 MoveElementCommand, SvgCanvas
 moveSelectedToLayer, SelectorManager
R
 releaseSelector, SelectorManager.SelectorManager
 RemoveElementCommand, SvgCanvas
 removeFromSelection, SelectorManager
 renameCurrentLayer, SelectorManager
 requestSelector, SelectorManager.SelectorManager
 reset, Selector.Selector
 resize, Selector.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.Selector
 SvgCanvas
T
 toXml, SvgCanvas
U
 unapply
 Undo/Redo history management, SvgCanvas
 updateGripCursors, Selector.Selector
+
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
 addCommandToHistory, SvgCanvas
 addSubCommand, SvgCanvas.BatchCommand
 addToSelection, SelectorManager
 apply
B
 BatchCommand, SvgCanvas
 beginUndoableChange, SvgCanvas
C
 ChangeElementCommand, SvgCanvas
 clear, SelectorManager
 clearSelection, SelectorManager
 createLayer, SelectorManager
D
 deleteCurrentLayer, SelectorManager
E
 elements
F
 Fill and Stroke, SelectorManager
 finishUndoableChange, SvgCanvas
 fromXml, SvgCanvas
 Functions, Selector
G
 getCurrentLayer, SelectorManager
 getLayer, SelectorManager
 getLayerOpacity, SelectorManager
 getLayerVisibility, SelectorManager
 getNextRedoCommandText, SvgCanvas.undoMgr
 getNextUndoCommandText, SvgCanvas.undoMgr
 getNumLayers, SelectorManager
 getRedoStackSize, SvgCanvas.undoMgr
 getRubberBandBox, SelectorManager.SelectorManager
 getSvgString, SelectorManager
 getUndoStackSize, SvgCanvas.undoMgr
 getVersion, SelectorManager
I
 importSvgString, SelectorManager
 initGroup, SelectorManager.SelectorManager
 InsertElementCommand, SvgCanvas
 isEmpty, SvgCanvas.BatchCommand
L
 Layers, SelectorManager
M
 MoveElementCommand, SvgCanvas
 moveSelectedToLayer, SelectorManager
R
 redo, SvgCanvas.undoMgr
 releaseSelector, SelectorManager.SelectorManager
 RemoveElementCommand, SvgCanvas
 removeFromSelection, SelectorManager
 renameCurrentLayer, SelectorManager
 requestSelector, SelectorManager.SelectorManager
 reset, Selector.Selector
 resetUndoStack, SvgCanvas
 resize, Selector.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.Selector
 SvgCanvas
T
 toXml, SvgCanvas
U
 unapply
 undo, SvgCanvas.undoMgr
 Undo/Redo history management, SvgCanvas
 updateGripCursors, Selector.Selector
-
Adds a given command to the history stack
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Runs “apply” on all subcommands
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
+
addCommandToHistory = c.undoCmd.add = function(cmd)
Adds a command object to the undo history stack
Adds a given command to the history stack
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
Runs “apply” on all subcommands
Performs the stored change action
Re-Inserts the new element
Re-removes the new element
-
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
+
var BatchCommand = this.undoCmd.batch = function(text)
History command that can contain/execute multiple other commands
c.beginUndoableChange = function(attrName,
elems)
This function tells the canvas to remember the old values of the attrName attribute for each element sent in.
-
var ChangeElementCommand = this.undoCmd.changeElement = function(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.
+
var ChangeElementCommand = this.undoCmd.changeElement = function(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.
-
Iterate through all our subcommands and returns all the elements we are changing
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
+
Iterate through all our subcommands and returns all the elements we are changing
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
Returns array with element associated with this command
-
fromXml = function(str)
Converts XML entities in a string to single characters.
+
c.finishUndoableChange = function()
This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called.
fromXml = function(str)
Converts XML entities in a string to single characters.
-
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.
Returns the rubberBandBox DOM element.
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.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.
String associated with the next redo command
String associated with the next undo command
this.getNumLayers = function()
Returns the number of layers in the current drawing.
Integer with the current size of the redo history stack
Returns the rubberBandBox DOM element.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
Integer with the current size of the undo history stack
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
Resets the parent selector group element
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
Returns a boolean indicating whether or not the batch command is empty
+
This function imports the input SVG XML into the current layer in the drawing
Resets the parent selector group element
var InsertElementCommand = this.undoCmd.insertElement = function(elem,
text)
History command for an element that was added to the DOM
Returns a boolean indicating whether or not the batch command is empty
@@ -49,23 +49,23 @@ if (browserType) {document.write("
");if (browserV -
var MoveElementCommand = this.undoCmd.moveElement = function(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.
+
var MoveElementCommand = this.undoCmd.moveElement = function(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.
-
Removes the selector of the given element (hides selection box)
var RemoveElementCommand = this.undoCmd.removeElement = function(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.
Returns the selector based on the given element
Used to reset the id and element that the selector is attached to
Updates the selector to match the element’s size
+
Performs a redo step
Removes the selector of the given element (hides selection box)
var RemoveElementCommand = this.undoCmd.removeElement = function(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.
Returns the selector based on the given element
Used to reset the id and element that the selector is attached to
resetUndoStack = function()
Resets the undo stack, effectively clearing the undo/redo history
Updates the selector to match the element’s size
-
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.
Private class for DOM element selection boxes
public class to manage all selector objects (selection boxes)
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.
Show the resize grips of this selector
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.
Private class for DOM element selection boxes
public class to manage all selector objects (selection boxes)
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.
Show the resize grips of this selector
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.
-
Runs “unapply” on all subcommands
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
Updates cursors for corner grips on rotation so arrows point the right way
+
Runs “unapply” on all subcommands
Reverses the stored change action
Removes the element
Re-positions the element
Re-adds the new element
Performs an undo step
Updates cursors for corner grips on rotation so arrows point the right way
diff --git a/docs/search/FunctionsA.html b/docs/search/FunctionsA.html index 5753b115..61b1192f 100644 --- a/docs/search/FunctionsA.html +++ b/docs/search/FunctionsA.html @@ -11,7 +11,7 @@ if (browserType) {document.write("
");if (browserV -
Loading...
addSubCommand, SvgCanvas.BatchCommand
addToSelection, SelectorManager
Searching...
No Matches