Curly braces: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
var line = brd.create('segment', [A,B]); | var line = brd.create('segment', [A,B]); | ||
var height = 1. | 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(); | ||