Interactive JessieScript

From JSXGraph Wiki
Revision as of 14:42, 4 January 2021 by A WASSERMANN (talk | contribs)
Jump to navigationJump to search

var board, construction = []; board = JXG.JSXGraph.initBoard('box', {grid:false, boundingbox:[-1,6,11,-3], keepaspectratio:true, axis:true});https://jsxgraph.org/distrib/JessieScript.js 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}); }


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