Aligning text: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 12: Line 12:
     brd.create('line', [-3, 1, 0], {strokeWidth:1, dash:2});
     brd.create('line', [-3, 1, 0], {strokeWidth:1, dash:2});
     brd.create('text', [3, 8, "Default"], {cssClass:'mytext'});
     brd.create('text', [3, 8, "Default"], {cssClass:'mytext'});
     brd.create('text', [3, 7, "Anchor left"], {anchorX:'left', cssClass:'mytext'});
     brd.create('text', [3, 7, "anchorX left"], {anchorX:'left', cssClass:'mytext'});
     brd.create('text', [3, 6, "Anchor middle"], {anchorX:'middle', cssClass:'mytext'});
     brd.create('text', [3, 6, "anchorX middle"], {anchorX:'middle', cssClass:'mytext'});
     brd.create('text', [3, 5, "Anchor right"], {anchorX:'right', cssClass:'mytext'});
     brd.create('text', [3, 5, "anchorX right"], {anchorX:'right', cssClass:'mytext'});
 
    brd.create('line', [-2, 0, 1], {strokeWidth:1, dash:2});
     brd.create('text', [1, 2, "Multiline text<br>default"], {cssClass:'mytext'});
     brd.create('text', [1, 2, "Multiline text<br>default"], {cssClass:'mytext'});
     brd.create('text', [2.2, 2, "Multiline text<br>Anchor bottom"], {anchorY:'bottom', cssClass:'mytext'});
     brd.create('text', [2.2, 2, "Multiline text<br>anchorY bottom"], {anchorY:'bottom', cssClass:'mytext'});
     brd.create('text', [3.4, 2, "Multiline text<br>Anchor middle"], {anchorY:'middle', cssClass:'mytext'});
     brd.create('text', [3.4, 2, "Multiline text<br>anchorY middle"], {anchorY:'middle', cssClass:'mytext'});
     brd.create('text', [4.6, 2, "Multiline text<br>anchor top"], {anchorY:'top', cssClass:'mytext'});
     brd.create('text', [4.6, 2, "Multiline text<br>anchorY top"], {anchorY:'top', cssClass:'mytext'});


</jsxgraph>
</jsxgraph>

Revision as of 07:49, 19 October 2012

The underlying JavaScript code