Class Index | File Index

Classes


Class JXG.Text

Text: On creation the GEONExT syntax of -terms are converted into JavaScript syntax. The coordinates can be relative to the coordinates of an element "element".
Defined in: Text.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JXG.Text(board, content, coords, attributes)
Construct and handle texts.
Method Summary
Method Attributes Method Name and Description
 
Return the width of the text element.
 
setCoords(x, y)
Move the text to new coordinates.
 
setPositionDirectly(method, coords, oldcoords)
Sets x and y coordinate of the text.
 
setText(text)
Defines new content.
 
Defines new content but converts < and > to HTML entities before updating the DOM.
 
Evaluates the text.
 
Updates the coordinates of the text element.
 
Recompute the width and the height of the text box.
 
X()
 
Y()
Class Detail
JXG.Text(board, content, coords, attributes)
Construct and handle texts.
Parameters:
board
content
coords
attributes
Returns:
A new geometry element Text
Method Detail
{Array} getSize()
Return the width of the text element.
Returns:
{Array} [width, height] in pixel

{object} setCoords(x, y)
Move the text to new coordinates.
Parameters:
{number} x
{number} y
Returns:
{object} reference to the text object.

setPositionDirectly(method, coords, oldcoords)
Sets x and y coordinate of the text.
Parameters:
{number} method
The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
{Array} coords
coordinates in screen/user units
{Array} oldcoords
previous coordinates in screen/user units

{JXG.Text} setText(text)
Defines new content.
Parameters:
{String|function} text
Returns:
{JXG.Text} Reference to the text object.

setTextJessieCode(text)
Defines new content but converts < and > to HTML entities before updating the DOM.
Parameters:
{String|function} text

update()
Evaluates the text. Then, the update function of the renderer is called.

updateCoords()
Updates the coordinates of the text element.

updateSize()
Recompute the width and the height of the text box. Update array this.size with pixel values. The result may differ from browser to browser by some pixels. In IE and canvas we use a very crude estimation of the dimensions of the textbox. In JSXGraph this.size is necessary for applying rotations in IE and for aligning text.

X()

Y()

Documentation generated by JsDoc Toolkit 2.4.0 on Fri May 31 2013 05:21:37 GMT-0000 (UTC)