Aligning text: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
<html>
<style type="text/css">
.mytext {
  border: 1 solid black;
}
</style>
</html>
<jsxgraph width="600" height="600">
<jsxgraph width="600" height="600">
     var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox: [-1,10,7,-1], axis:true, keepAspectRatio:false});
     var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox: [-1,10,7,-1], axis:true, keepAspectRatio:false});


     brd.create('text', [3, 8, "Default"]);
     brd.create('text', [3, 8, "Default"], {cssClass:'mytext'});
     brd.create('text', [3, 7, "Anchor left"], {anchorX:'left'});
     brd.create('text', [3, 7, "Anchor left"], {anchorX:'left', cssClass:'mytext'});
     brd.create('text', [3, 6, "Anchor middle"], {anchorX:'middle'});
     brd.create('text', [3, 6, "Anchor middle"], {anchorX:'middle', cssClass:'mytext'});
     brd.create('text', [3, 5, "Anchor right"], {anchorX:'right'});
     brd.create('text', [3, 5, "Anchor right"], {anchorX:'right', cssClass:'mytext'});
     brd.create('text', [3, 4, "multiline text<br>default"]);
    brd.create('text', [3, 4, "multiline text<br>default"], {cssClass:'mytext'});
     brd.create('text', [3, 4, "multiline text<br>default"], {anchorY:'bottom', cssClass:'mytext');
 
</jsxgraph>
</jsxgraph>



Revision as of 07:41, 19 October 2012

The underlying JavaScript code