Difference between revisions of "Dependent gliders"

From JSXGraph Wiki
Jump to: navigation, search
Line 7: Line 7:
 
var B = brd.create('glider', [-3,-1,li]);
 
var B = brd.create('glider', [-3,-1,li]);
 
var C = brd.create('glider', [ 3,-1,li]);
 
var C = brd.create('glider', [ 3,-1,li]);
 +
brd.addHook(function() {
 +
    B.position = A.position + 0.5;
 +
    B.prepareUpdate().update().updateRenderer();
 +
}, 'update');
 
</jsxgraph>
 
</jsxgraph>

Revision as of 21:13, 10 January 2012