Class JXG.JSXGraph
↳ JXG.JSXGraph
The JXG.JSXGraph singleton stores all properties required
to load, save, create and free a board.
Defined in: jsxgraph.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Constructs a new JSXGraph singleton object.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
JXG.JSXGraph.boards
Associative array that keeps references to all boards.
|
<static> |
JXG.JSXGraph.elements
Associative array that keeps track of all constructable elements registered
via JXG.JSXGraph.registerElement.
|
<static> |
JXG.JSXGraph.licenseText
The small gray version indicator in the top left corner of every JSXGraph board (if
showCopyright is not set to false on board creation).
|
<static> |
JXG.JSXGraph.rendererType
Stores the renderer that is used to draw the boards.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
JXG.JSXGraph.freeBoard(board)
Delete a board and all its contents.
|
<static> |
JXG.JSXGraph.initBoard(box, attributes)
Initialise a new board.
|
<static> |
JXG.JSXGraph.loadBoardFromFile(box, file, format)
Load a board from a file containing a construction made with either GEONExT,
Intergeo, Geogebra, or Cinderella.
|
<static> |
JXG.JSXGraph.loadBoardFromString(box, string, format)
Load a board from a base64 encoded string containing a construction made with either GEONExT,
Intergeo, Geogebra, or Cinderella.
|
<static> |
JXG.JSXGraph.registerElement(element, creator)
This registers a new construction element to JSXGraph for the construction via the JXG.Board.create
interface.
|
<static> |
JXG.JSXGraph.unregisterElement(element)
The opposite of JXG.JSXGraph.registerElement, it removes a given element from
the element list.
|
Field Detail
<static>
{Object}
JXG.JSXGraph.boards
Associative array that keeps references to all boards.
<static>
{Object}
JXG.JSXGraph.elements
Associative array that keeps track of all constructable elements registered
via JXG.JSXGraph.registerElement.
<static>
{String}
JXG.JSXGraph.licenseText
The small gray version indicator in the top left corner of every JSXGraph board (if
showCopyright is not set to false on board creation).
<static>
{String}
JXG.JSXGraph.rendererType
Stores the renderer that is used to draw the boards.
Method Detail
<static>
JXG.JSXGraph.freeBoard(board)
Delete a board and all its contents.
- Parameters:
- {String} board
- HTML-ID to the DOM-element in which the board is drawn.
<static>
{JXG.Board}
JXG.JSXGraph.initBoard(box, attributes)
Initialise a new board.
- Parameters:
- {String} box
- Html-ID to the Html-element in which the board is painted.
- attributes
- Returns:
- {JXG.Board} Reference to the created board.
<static>
{JXG.Board}
JXG.JSXGraph.loadBoardFromFile(box, file, format)
Load a board from a file containing a construction made with either GEONExT,
Intergeo, Geogebra, or Cinderella.
- Parameters:
- {String} box
- HTML-ID to the HTML-element in which the board is painted.
- {String} file
- base64 encoded string.
- {String} format
- containing the file format: 'Geonext' or 'Intergeo'.
- Returns:
- {JXG.Board} Reference to the created board.
- See:
- JXG.FileReader
- JXG.GeonextReader
- JXG.GeogebraReader
- JXG.IntergeoReader
- JXG.CinderellaReader
<static>
{JXG.Board}
JXG.JSXGraph.loadBoardFromString(box, string, format)
Load a board from a base64 encoded string containing a construction made with either GEONExT,
Intergeo, Geogebra, or Cinderella.
- Parameters:
- {String} box
- HTML-ID to the HTML-element in which the board is painted.
- {String} string
- base64 encoded string.
- {String} format
- containing the file format: 'Geonext' or 'Intergeo'.
- Returns:
- {JXG.Board} Reference to the created board.
- See:
- JXG.FileReader
- JXG.GeonextReader
- JXG.GeogebraReader
- JXG.IntergeoReader
- JXG.CinderellaReader
<static>
JXG.JSXGraph.registerElement(element, creator)
This registers a new construction element to JSXGraph for the construction via the JXG.Board.create
interface.
- Parameters:
- {String} element
- The elements name. This is case-insensitive, existing elements with the same name will be overwritten.
- {Function} creator
- A reference to a function taking three parameters: First the board, the element is to be created on, a parent element array, and an attributes object. See JXG.createPoint or any other JXG.create... function for an example.
<static>
JXG.JSXGraph.unregisterElement(element)
The opposite of JXG.JSXGraph.registerElement, it removes a given element from
the element list. You probably don't need this.
- Parameters:
- {String} element
- The name of the element which is to be removed from the element list.