A JSXGraph Widget for TiddlyWiki5.
In your tiddler use the jsxgraph
widget like this:
<$jsxgraph width="600px" height="400px">
var brd = JXG.JSXGraph.initBoard('ignored',
{axis:true,originX: 250, originY: 250, unitX: 50, unitY: 25});
...
</$jsxgraph>
Note that the first argument to initBoard()
will be ignored (and set internally by the widget).
Check the demo at $:/plugins/kpe/jsxgraph/jsxgraph.demo.tid.
When updating jsxgraphcore.js consider, that the distribution of JSXGraph uses requirejs through almond, and it somehow does not load properly in node's CommonJS.
As a workaround replace the
require("../build/core.deps.js")}();
at the end of the last line with:
module.exports = require("../build/core.deps.js")}();