Class Index | File Index

Classes


Class JXG.JSXGraph

The JXG.JSXGraph singleton stores all properties required to load, save, create and free a board.
Defined in: jsxgraph.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new JSXGraph singleton object.
Field Summary
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 Summary
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.
Class Detail
JXG.JSXGraph()
Constructs a new JSXGraph singleton object.
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.
{Object} attributes
An object that sets some of the board properties. Most of these properties can be set via JXG.Options. Valid properties are
  • boundingbox: An array containing four numbers describing the left, top, right and bottom boundary of the board in user coordinates
  • keepaspectratio: If true, the bounding box is adjusted to the same aspect ratio as the aspect ratio of the div containing the board.
  • showCopyright: Show the copyright string in the top left corner.
  • showNavigation: Show the navigation buttons in the bottom right corner.
  • zoom: Allow the user to zoom with the mouse wheel or the two-fingers-zoom gesture.
  • pan: Allow the user to pan with shift+drag mouse or two-fingers-pan gesture.
  • axis: If set to true, show the axis. Can also be set to an object that is given to both axes as an attribute object.
  • grid: If set to true, shows the grid. Can also bet set to an object that is given to the grid as its attribute object.
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.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 30 2013 23:22:18 GMT+0200 (CEST)