Namespace JXG.Dump
↳ JXG.Dump
Defined in: Dump.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The JXG.Dump namespace provides classes and methods to save a board to javascript.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
JXG.Dump.addMarkers(board, markers, values)
Adds markers to every element of the board
|
<static> |
JXG.Dump.deleteMarkers(board, markers)
Removes markers from every element on the board.
|
<static> |
JXG.Dump.dump(board)
Generate a save-able structure with all elements.
|
<static> |
JXG.Dump.minimizeObject(instance, %)
Eliminate default values given by JXG.Options from the attributes object.
|
<static> |
JXG.Dump.prepareAttributes(board, obj)
Prepare the attributes object for an element.
|
<static> |
JXG.Dump.str(s)
Stringifies a string, i.e.
|
<static> |
JXG.Dump.toJavaScript(board)
Saves the construction in board to JavaScript.
|
<static> |
JXG.Dump.toJessie(board)
Saves the construction in board to JessieScript.
|
<static> |
JXG.Dump.toJSAN(obj)
Converts a JavaScript object into a JSAN (JessieScript Attribute Notation) string.
|
Namespace Detail
JXG.Dump
The JXG.Dump namespace provides classes and methods to save a board to javascript.
Method Detail
<static>
JXG.Dump.addMarkers(board, markers, values)
Adds markers to every element of the board
- Parameters:
- {JXG.Board} board
- {Array|String} markers
- {Array|%} values
<static>
JXG.Dump.deleteMarkers(board, markers)
Removes markers from every element on the board.
- Parameters:
- {JXG.Board} board
- {Array|String} markers
<static>
{Array}
JXG.Dump.dump(board)
Generate a save-able structure with all elements. This is used by JXG.Dump#toJessie and JXG.Dump#toJavaScript
to generate the script.
- Parameters:
- {JXG.Board} board
- Returns:
- {Array} An array with all metadata necessary to save the construction.
<static>
{Object}
JXG.Dump.minimizeObject(instance, %)
Eliminate default values given by JXG.Options from the attributes object.
- Parameters:
- {Object} instance
- Attribute object of the element
- {Object} %
- Arbitrary number of objects instance will be compared to. Usually these are sub-objects of the JXG.Board#options structure.
- Returns:
- {Object} Minimal attributes object
<static>
{Object}
JXG.Dump.prepareAttributes(board, obj)
Prepare the attributes object for an element.
- Parameters:
- {JXG.Board} board
- {JXG.GeometryElement} obj
- Geometry element which attributes object is generated
- Returns:
- {Object} An attributes object.
<static>
{String}
JXG.Dump.str(s)
Stringifies a string, i.e. puts some quotation marks around s if it is of type string.
- Parameters:
- {%} s
- Returns:
- {String} " + s + "
<static>
{String}
JXG.Dump.toJavaScript(board)
Saves the construction in board to JavaScript.
- Parameters:
- {JXG.Board} board
- Returns:
- {String} JavaScript
<static>
{String}
JXG.Dump.toJessie(board)
Saves the construction in board to JessieScript.
- Parameters:
- {JXG.Board} board
- Returns:
- {String} JessieScript
<static>
{String}
JXG.Dump.toJSAN(obj)
Converts a JavaScript object into a JSAN (JessieScript Attribute Notation) string.
- Parameters:
- {Object} obj
- A JavaScript object, functions will be ignored.
- Returns:
- {String} The given object stored in a JSAN string.