Class Index | File Index

Classes


Class Text


Extends JXG.GeometryElement.
This element is used to provide a constructor for text, which is just a wrapper for element Text.
Defined in: Text.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Text(x,y,str)
Fields borrowed from class JXG.GeometryElement:
addEvent, ancestors, board, childElements, dash, descendants, draft, dump, elementClass, elType, eventHandlers, fillColor, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, type, visible, visProp, withLabel
Methods borrowed from class JXG.GeometryElement:
addChild, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, createLabel, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, hasPoint, hideElement, labelColor, noHighlight, off, on, remove, resolveShortcuts, setArrow, setAttribute, setLabelText, setProperty, showElement, triggerEventHandlers, update
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Class Detail
Text(x,y,str)
// Create a fixed text at position [0,1].
  var t1 = board.create('text',[0,1,"Hello World"]); 

				
				
// Create a variable text at a variable position.
  var s = board.create('slider',[[0,4],[3,4],[-2,0,2]]);
  var graph = board.create('text', 
                       [function(x){ return s.Value();}, 1,
                        function(){return "The value of s is"+s.Value().toFixed(2);}
                       ]
                    );

				
				
				
				
					
						
Parameters:
{number|function_number|function_String|function} x,y,str
Parent elements for text elements.

x and y are the coordinates of the lower left corner of the text box. The position of the text is fixed, x and y are numbers. The position is variable if x or y are functions.

The text to display may be given as string or as function returning a string. There is the attribute 'display' which takes the values 'html' or 'internal'. In case of 'html' a HTML division tag is created to display the text. In this case it is also possible to use ASCIIMathML. Incase of 'internal', a SVG or VML text element is used to display the text.

See:
JXG.Text

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 30 2013 23:22:19 GMT+0200 (CEST)