Interactive JessieScript: Difference between revisions

From JSXGraph Wiki
No edit summary
Line 31: Line 31:


===Available commands===
===Available commands===
See our [http://jsxgraph.uni-bayreuth.de/wp/documentation/ documentation page] for a list of commands.
See our [http://jsxgraph.org/distrib/jessiescript_ref_en.pdf documentation page] for a list of commands.


==The JavaScript code==
==The JavaScript code==

Revision as of 13:49, 4 January 2021




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});
}