# Difference between revisions of "Interactive JessieScript"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
|||

Line 13: | Line 13: | ||

board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true}); | board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true}); | ||

} | } | ||

− | |||

</jsxgraph> | </jsxgraph> | ||

Line 27: | Line 26: | ||

</html> | </html> | ||

− | === | + | ===Available commands=== |

− | + | See our [[http://jsxgraph.uni-bayreuth.de/wp/documentation/ documentation page]] for a list of commands. | |

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | + | ==The JavaScript code== | |

<source lang="javascript"> | <source lang="javascript"> | ||

var board, construction = []; | var board, construction = []; | ||

Line 65: | Line 39: | ||

construction.push(board.construct(t)); | construction.push(board.construct(t)); | ||

board.unsuspendUpdate(); | board.unsuspendUpdate(); | ||

+ | } | ||

+ | |||

+ | function clearAll() { | ||

+ | JXG.JSXGraph.freeBoard(board); | ||

+ | board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true}); | ||

} | } | ||

</source> | </source> |

## Revision as of 08:47, 8 June 2011

### Available commands

See our [documentation page] for a list of commands.

## The JavaScript code

```
var board, construction = [];
board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true});
function construct() {
var t = document.getElementById('input').value;
board.suspendUpdate();
construction.push(board.construct(t));
board.unsuspendUpdate();
}
function clearAll() {
JXG.JSXGraph.freeBoard(board);
board = JXG.JSXGraph.initBoard('box', {grid:true, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true});
}
```