0

I am hoping to use 2 different boards and make elements of one dependent on elements on the other board. Is this possible?

4

1 回答 1

2

是的,板可以通过连接board1.addChild(board2)。然后,每次更新都会board1触发 的更新board2。这是一个简单的示例(在https://jsfiddle.net/vcL7aepo/6/现场查看):

var board1 = JXG.JSXGraph.initBoard('box1', {
                boundingbox: [-5, 5, 5, -5],
                axis: false,
                showNavigation: false
          });
var board2 = JXG.JSXGraph.initBoard('box2', {
                boundingbox: [-5, 5, 5, -5],
                axis: true,
                showNavigation: false
          });

board1.addChild(board2);
var a = board1.create('slider', [[-3,1], [3,1], [-10,1,10]]);
var f = board2.create('functiongraph', [
        function(x) { return a.Value()*x*x;} 
    ]);
于 2018-02-15T08:06:03.080 回答