Dependent gliders: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 8: Line 8:
var C = brd.create('glider', [ 3,-1,li]);
var C = brd.create('glider', [ 3,-1,li]);
brd.addHook(function() {
brd.addHook(function() {
     B.position = A.position - 0.5;
     if (brd.highlightedObjects['A']!=null) {
    B.prepareUpdate().update(true).updateRenderer();
      B.position = A.position - 0.5;
  }, 'update');
      B.prepareUpdate().update(true).updateRenderer();
    }
  }, 'mousemove');
</jsxgraph>
</jsxgraph>

Revision as of 20:32, 10 January 2012