Mutually dependent line and gliders: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 13: Line 13:
var gl2 = board.create('glider', [1,0, el1], {name:'a'});
var gl2 = board.create('glider', [1,0, el1], {name:'a'});
var line = board.create('line', [gl1, gl2]);
var line = board.create('line', [gl1, gl2]);
line.draggable = function() { return true; };
line.draggable = function() { console.log('X'); return true; };


var offset = gl2.Y() - gl1.Y();
var offset = gl2.Y() - gl1.Y();

Revision as of 08:08, 1 June 2012