Difference between revisions of "Dependent gliders"

From JSXGraph Wiki
Jump to: navigation, search
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() {
     if (brd.highlightedObjects['A']!=null) {
+
     if (brd.highlightedObjects[A.id]!=null) {
 
       B.position = A.position - 0.5;
 
       B.position = A.position - 0.5;
 
       B.prepareUpdate().update(true).updateRenderer();
 
       B.prepareUpdate().update(true).updateRenderer();

Revision as of 21:34, 10 January 2012