Curly braces: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 5: Line 5:
var line = brd.create('segment', [A,B]);
var line = brd.create('segment', [A,B]);


var height = 1.5; // height of the curly brace
var height = 1.0; // height of the curly brace


// Curly brace
// Curly brace
Line 21: Line 21:
     this.dataY = [ A.Y(), A.Y()+d[0], mid[1], mid[1]+d[0], mid[1], B.Y()+d[0], B.Y()];
     this.dataY = [ A.Y(), A.Y()+d[0], mid[1], mid[1]+d[0], mid[1], B.Y()+d[0], B.Y()];
};
};
// Text
var txt = brd.create('text', [
                function() { return [A.X()+2, A.Y()]; }
                ]);
brd.update();
brd.update();



Revision as of 12:54, 19 February 2013