API Docs for: 0.99.4
Show:

# JXG.Text Class

Construct and handle texts. Creates a new text object. Do not use this constructor to create a text. Use JXG.Board#create with type Text instead.

The coordinates can be relative to the coordinates of an element given in undefined.

MathJax, HTML and GEONExT syntax can be handled.

## Methods

### _anim

(
• direction
• stepCount
)
private chainable

Animates a glider. Is called by the browser after startAnimation is called.

#### Parameters:

• direction Number

The direction the glider is animated.

• stepCount Number

The number of steps.

#### Returns:

JXG.CoordsElement:

This element

• #startAnimation
• #stopAnimation

### _set

(
• property
• value
)
private chainable

Sets the value of property property to value.

#### Parameters:

• property String

The property's name.

• value Object

The new value

### _setText

(
• text
)
private chainable

Defines new content. This is used by JXG.Text#setTextJessieCode and JXG.Text#setText. This is required because JessieCode needs to filter all Texts inserted into the DOM and thus has to replace setText by setTextJessieCode.

#### Parameters:

• text

#### Returns:

JXG.Text:

Reference to the text object.

### _setUpdateText

(
• text
)
private chainable

This sets the updateText function of this element that depending on the type of text content passed. Used by JXG.Text#_setText and JXG.Text constructor.

#### Parameters:

• text

#### Returns:

JXG.Text:

Reference to the text object.

### addAnchor

(
• coordinates
• isLabel
)
private chainable

In case there is an attribute "anchor", the element is bound to this anchor element. This is handled with this.relativeCoords. If the element is a label relativeCoords are given in scrCoords, otherwise in usrCoords.

#### Parameters:

• coordinates Array

Offset from th anchor element. These are the values for this.relativeCoords. In case of a label, coordinates are screen coordinates. Otherwise, coordinates are user coordinates.

• isLabel Boolean

Yes/no

#### Returns:

JXG.CoordsElement:

This element

### addChild

(
• obj
)
chainable

Add an element as a child to the current element. Can be used to model dependencies between geometry elements.

### addConstraint

(
• terms
)
chainable

Convert the point to CAS point and call update().

#### Parameters:

• terms Array

[[zterm], xterm, yterm] defining terms for the z, x and y coordinate. The z-coordinate is optional and it is used for homogeneous coordinates. The coordinates may be either

• a JavaScript function,
• a string containing GEONExT syntax. This string will be converted into a JavaScript function here,
• a Number
• pointer to a slider object. This will be converted into a call of the Value()-method of this slider.

#### Returns:

JXG.CoordsElement:

This element

• JXG.GeonextParser#geonext2JS

### addDescendants

(
• obj
)
private chainable

Adds the given object to the descendants list of this object and all its child objects.

#### Parameters:

• obj JXG.GeometryElement

The element that is to be added to the descendants list.

### addParents

(
• parents
)
JXG.Object chainable

Adds ids of elements to the array this.parents. This method needs to be called if some dependencies can not be detected automatically by JSXGraph. For example if a function graph is given by a function which referes to coordinates of a point, calling addParents() is necessary.

#### Parameters:

• parents Array

Array of elements or ids of elements. Alternatively, one can give a list of objects as parameters.

#### Returns:

JXG.Object:

reference to the object itself.

#### Example:

// Movable function graph
var A = board.create('point', [1, 0], {name:'A'}),
B = board.create('point', [3, 1], {name:'B'}),
f = board.create('functiongraph', function(x) {
var ax = A.X(),
ay = A.Y(),
bx = B.X(),
by = B.Y(),
a = (by - ay) / ( (bx - ax) * (bx - ax) );
return a * (x - ax) * (x - ax) + ay;
}, {fixed: false});


### addRotation

(
• angle
)
chainable

Rotate texts or images by a given degree. Works only for texts where JXG.Text#display equal to "internal".

#### Parameters:

• angle Number

The degree of the rotation (90 means vertical text).

• JXG.GeometryElement#rotate

### addTransform

(
• el
• transform
)
chainable

Add transformations to this JXG.CoordsElement.

#### Parameters:

• el JXG.GeometryElement
• transform

Either one {@link JXG.Transformation} or an array of {@link JXG.Transformation}s.

#### Returns:

JXG.CoordsElement:

This element

### animate

(
• hash
• time
• [options]
)
chainable

Animates properties for that object like stroke or fill color, opacity and maybe even more later.

#### Parameters:

• hash Object

Object containing properties with target values for the animation.

• time Number

Number of milliseconds to complete the animation.

• [options] Object optional

Optional settings for the animation:

• callback: A function that is called as soon as the animation is finished.

#### Returns:

JXG.GeometryElement:

A reference to the object

### bounds

()

Dimensions of the smallest rectangle enclosing the element.

#### Returns:

Array:

The coordinates of the enclosing rectangle in a format like the bounding box in {@link JXG.Board#setBoundingBox}.

### checkForSizeUpdate

() private chainable

Used to avoid updateSize() calls. Called in JXG.Text.update. If true it means that this.update has been called. More tests for size changes are in JXG.Renderer.updateTextStyle. The latter tests are one update off. But this should pose not too many problems, since it affects fontSize and cssClass changes.

#### Returns:

JXG.Text:

reference to the text object.

### clearTrace

() chainable

Removes all objects generated by the trace function.

### cloneToBackground

() chainable

Copy the element to background. This is used for tracing elements.

### convertGeonext2CSS

() private

Converts the GEONExT tags and to HTML span tags with proper CSS formating.

#### Returns:

String:

Converted HTML text

• JXG.Text#JXG.Text.generateTerm @see JXG.Text._setText

### countChildren

() private

Counts the direct children of an object without counting labels.

#### Returns:

Number:

Number of children

### create

(
• Callback
• board
• coords
• attr
• arg1
• arg2
)
private

Generic method to create point, text or image. Determines the type of the construction, i.e. free, or constrained by function, transformation or of glider type.

#### Parameters:

• Callback Object

Object type, e.g. JXG.Point, JXG.Text or JXG.Image

• board Object

Link to the board object

• coords Array

Array with coordinates. This may be: array of numbers, function returning an array of numbers, array of functions returning a number, object and transformation. If the attribute "slideObject" exists, a glider element is constructed.

• attr Object

Attributes object

• arg1 Object

Optional argument 1: in case of text this is the text content, in case of an image this is the url.

• arg2 Array

Optional argument 2: in case of image this is an array containing the size of the image.

#### Returns:

Object:

returns the created object or false.

### createGradient

() private chainable

Creates a gradient nodes in the renderer.

### createLabel

() chainable

Creates a label element for this geometry element.

### crudeSizeEstimate

() private

A very crude estimation of the dimensions of the textbox in case nothing else is available.

### dash

(
• d
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1703

Deprecated: Use {@link #setAttribute}

Set the dash type of an element

#### Parameters:

• d Number

Integer which determines the way of dashing an element's outline.

### Dist

(
• point2
)

Getter method for the distance to a second JXG.CoordsElement (point, image, text).

#### Parameters:

• point2 JXG.CoordsElement

The JXG.CoordsElement to which the distance shall be calculated.

#### Returns:

Number:

Distance in user coordinate to the given JXG.CoordsElement.

### draggable

() private

Decides whether an element can be dragged. This is used in JXG.GeometryElement#setPositionDirectly methods where all parent elements are checked if they may be dragged, too.

### expandShortMath

(
• expr
)
private

Converts shortened math syntax into correct syntax: 3x instead of 3x or (a+b)(3+1) instead of (a+b)(3+1).

#### Parameters:

• expr String

Math term

String:

expanded String

### fillColor

(
• fColor
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1657

Deprecated: Use {@link #setAttribute}

Set the fillColor of an element

#### Parameters:

• fColor String

String which determines the fill color of an object.

### free

() chainable

Converts a calculated element into a free element, i.e. it will delete all ancestors and transformations and, if the element is currently a glider, will remove the slideObject reference.

#### Returns:

JXG.CoordsElement:

This element

### generatePolynomial

()

Array of strings containing the polynomials defining the element. Used for determining geometric loci the groebner way.

#### Returns:

Array:

An array containing polynomials describing the locus of the current object.

### generateTerm

(
• contentStr
• [expand]
)
private

Converts the GEONExT syntax of the terms into JavaScript. Also, all Objects whose name appears in the term are searched and the text is added as child to these objects.

#### Parameters:

• contentStr String

String to be parsed

• [expand] Boolean optional

Optional flag if shortened math syntax is allowed (e.g. 3x instead of 3*x).

#### Returns:

String:

Plaintext String

• JXG.Text#JXG.GeonextParser.geonext2JS.

### getAttribute

(
• key
)

Get the value of the property key.

#### Parameters:

• key String

The name of the property you are looking for

#### Returns:

The value of the property

### getAttributes

()

Retrieve a copy of the current visProp.

### getLabelAnchor

()

Returns the coords object where the label of the element shall be drawn. Differs in some cases from the values that getTextAnchor returns.

#### Returns:

JXG.Coords:

JXG.Coords Place where the text shall be drawn.

### getName

()

Returns the elements name, used in JessieCode.

### getParents

()

List of the element ids resp. values used as parents in JXG.Board#create.

### getProperty

() deprecated

Inherited from JXG.GeometryElement: src/base/element.js:1237

Deprecated: Use {@link JXG.GeometryElement#getAttribute}.

Deprecated alias for JXG.GeometryElement#getAttribute.

### getSize

()

Return the width of the text element.

#### Returns:

Array:

[width, height] in pixel

### getTextAnchor

()

Returns the coords object where a text that is bound to the element shall be drawn. Differs in some cases from the values that getLabelAnchor returns.

#### Returns:

JXG.Coords:

JXG.Coords Place where the text shall be drawn.

### getTpye

()

The type of the element as used in JXG.Board#create.

### handleAttractors

() chainable

A JXG.CoordsElement can change its type from free JXG.CoordsElement to glider and vice versa. If it is given an array of attractor elements (attribute attractors) and the attribute attractorDistance then the JXG.CoordsElement will be made a glider if it less than attractorDistance apart from one of its attractor elements. If attractorDistance is equal to zero, the JXG.CoordsElement stays in its current form.

#### Returns:

JXG.CoordsElement:

Reference to this element

### handleSnapToGrid

(
• force
)
chainable

Move an element to its nearest grid point. The function uses the coords object of the element as its actual position. If there is no coords object, nothing is done.

#### Parameters:

• force Boolean

force snapping independent from what the snaptogrid attribute says

#### Returns:

JXG.GeometryElement:

Reference to this element

### handleSnapToPoints

(
• force
)
chainable

Let a JXG.CoordsElement snap to the nearest JXG.CoordsElement in distance of undefined. The function uses the coords object of the JXG.CoordsElement as its actual position.

#### Parameters:

• force Boolean

force snapping independent from what the snaptogrid attribute says

#### Returns:

JXG.CoordsElement:

Reference to this element

### hasPoint

(
• x
• y
)
private

Test if the the screen coordinates (x,y) are in a small stripe at the left side or at the right side of the text. Sensitivity is set in this.board.options.precision.hasPoint. If dragarea is set to 'all' (default), tests if the the screen coordinates (x,y) are in within the text boundary.

### hideElement

() chainable

Hide the element. It will still exist but not visible on the board.

### highlight

(
• [force=false]
)
chainable

Highlights the element.

#### Parameters:

• [force=false] Boolean optional

Force the highlighting

### highlightFillColor

(
• fColor
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1673

Deprecated: Use {@link #setAttribute}

Set the highlightFillColor of an element

#### Parameters:

• fColor String

String which determines the fill color of an object when its highlighted.

### highlightStrokeColor

(
• sColor
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1611

Deprecated: Use {@link #setAttribute}

Set the highlightStrokeColor of an element

#### Parameters:

• sColor String

String which determines the stroke color of an object when its highlighted.

### labelColor

(
• lColor
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1688

Deprecated: Use {@link #setAttribute}

Set the labelColor of an element

#### Parameters:

• lColor String

String which determines the text color of an object's label.

### makeGlider

(
• slide
)
chainable

Convert the JXG.CoordsElement to glider and update the construction. To move the JXG.CoordsElement visual onto the glider, a subsequent call of board.update() is necessary.

#### Parameters:

• slide

The object the point will be bound to.

#### Returns:

JXG.CoordsElement:

This element

### moveAlong

(
• path
• time
• [options]
)
chainable

Starts an animation which moves the JXG.CoordsElement along a given path in given time.

#### Parameters:

• path

The path the JXG.CoordsElement is moved on. This can be either an array of arrays containing x and y values of the points of the path, or function taking the amount of elapsed time since the animation has started and returns an array containing a x and a y value or NaN. In case of NaN the animation stops.

• time Number

The time in milliseconds in which to finish the animation

• [options] Object optional

Optional settings for the animation.

• [callback] Function optional

A function that is called as soon as the animation is finished.

• [interpolate=true] Boolean optional

If path is an array moveAlong() will interpolate the path using {@link JXG.Math.Numerics#Neville}. Set this flag to false if you don't want to use interpolation.

#### Returns:

JXG.CoordsElement:

This element

### moveTo

(
• where
• [time]
• [options]
)
chainable

Starts an animated JXG.CoordsElement movement towards the given coordinates where. The animation is done after time milliseconds. If the second parameter is not given or is equal to 0, setPosition() is called, see #setPosition.

#### Parameters:

• where Array

Array containing the x and y coordinate of the target location.

• [time] Number optional

Number of milliseconds the animation should last.

• [options] Object optional

Optional settings for the animation

• [callback] Function optional

A function that is called as soon as the animation is finished.

• [effect='<>'] String optional

animation effects like speed fade in and out. possible values are '<>' for speed increase on start and slow down at the end (default) and '--' for constant speed during the whole animation.

#### Returns:

JXG.CoordsElement:

This element

• #animate

### noHighlight

() chainable

Uses the "normal" properties of the element.

### normalize

() private chainable

Normalize the element's standard form.

### notifyParents

(
• content
)
private chainable

Finds dependencies in a given term and notifies the parents by adding the dependent object to the found objects child elements.

#### Parameters:

• content String

String containing dependencies for the given object.

#### Returns:

JXG.Text:

reference to the text object.

### popSlideObject

() chainable

Remove the last slideObject. If there are more than one elements to which the JXG.CoordsElement is bound to, the second last element is the new active slideObject.

#### Returns:

JXG.CoordsElement:

This element

### prepareUpdate

() private chainable

Notify all child elements for updates.

### remove

() chainable

Removes the element from the construction. This only removes the SVG or VML node of the element and its label (if available) from the renderer, to remove the element completely you should use JXG.Board#removeObject.

### removeChild

(
• obj
)
chainable

Remove an element as a child from the current element.

### removeDescendants

(
• obj
)
private chainable

Removes the given object from the descendants list of this object and all its child objects.

#### Parameters:

• obj JXG.GeometryElement

The element that is to be removed from the descendants list.

### replaceSub

(
• te
)
private

Replace _{} by <sub>

#### Parameters:

• te String

String containing _{}.

#### Returns:

String:

Given string with _{} replaced by <sub>.

### replaceSup

(
• te
)
private

Replace ^{} by <sup>

#### Parameters:

• te String

String containing ^{}.

#### Returns:

String:

Given string with ^{} replaced by <sup>.

### resolveShortcuts

(
• properties
)

Resolves property shortcuts like color and expands them, e.g. strokeColor and fillColor. Writes the expanded properties back to the given properties.

#### Parameters:

• properties Object

#### Returns:

Object:

The given parameter with shortcuts expanded.

### setArrow

(
• firstArrow
• lastArrow
)
chainable

Determines whether the element has arrows at start or end of the arc.

#### Parameters:

• firstArrow Boolean

True if there is an arrow at the start of the arc, false otherwise.

• lastArrow Boolean

True if there is an arrow at the end of the arc, false otherwise.

### setAttribute

(
• attributes
)
chainable

Sets an arbitrary number of attributes.

#### Parameters:

• attributes Object

An object with attributes.

#### Example:

// Set property directly on creation of an element using the attributes object parameter
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-1, 5, 5, 1]};
var p = board.create('point', [2, 2], {visible: false});

// Now make this point visible and fixed:
p.setAttribute({
fixed: true,
visible: true
});

### setCoords

(
• x
• y
)
chainable

Move the text to new coordinates.

#### Returns:

JXG.Text:

reference to the text object.

### setDash

(
• dash
)
private chainable

Set the dash style of an object. See undefined for a list of available dash styles. You should use undefined instead of this method.

#### Parameters:

• dash Number

Indicates the new dash style

### setGliderPosition

(
• x
)
chainable

Sets the position of a glider relative to the defining elements of the undefined.

#### Returns:

JXG.CoordsElement:

This element

### setLabel

(
• str
)
chainable

Sets a label and it's text If label doesn't exist, it creates one

### setLabelText

(
• str
)
chainable

Updates the element's label text, strips all html.

### setName

(
• str
)
chainable

Updates the element's label text and the element's attribute "name", strips all html.

### setParents

(
• parents
)
JXG.Object chainable

Sets ids of elements to the array this.parents. First, this.parents is cleared. See undefined.

#### Parameters:

• parents Array

Array of elements or ids of elements. Alternatively, one can give a list of objects as parameters.

#### Returns:

JXG.Object:

reference to the object itself.

### setPosition

(
• method
• coords
)
chainable

Sets coordinates and calls the point's update() method.

#### Parameters:

• method Number

The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.

• coords Array

coordinates in screen/user units

#### Returns:

JXG.CoordsElement:

This element

### setPositionByTransform

(
• method
• tv
)
chainable

Translates the point by tv = (x, y).

#### Parameters:

• method Number

The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.

• tv Array

Array containing the translation vector [x, y]

#### Returns:

JXG.CoordsElement:

This element

### setPositionDirectly

(
• method
• coords
)
chainable

Sets coordinates and calls the point's update() method.

#### Parameters:

• method Number

The type of coordinates used here. Possible values are {@link JXG.COORDS_BY_USER} and {@link JXG.COORDS_BY_SCREEN}.

• coords Array

coordinates ([z], x, y) in screen/user units

#### Returns:

JXG.CoordsElement:

this element

### setProperty

() deprecated

Inherited from JXG.GeometryElement: src/base/element.js:1030

Deprecated: Use {@link JXG.GeometryElement#setAttribute}.

Deprecated alias for JXG.GeometryElement#setAttribute.

### setText

(
• text
)
chainable

Defines new content.

#### Parameters:

• text

#### Returns:

JXG.Text:

Reference to the text object.

### setTextJessieCode

(
• text
)
chainable

Defines new content but converts < and > to HTML entities before updating the DOM.

#### Parameters:

• text

#### Returns:

JXG.Text:

Reference to the text object.

### shadow

(
• s
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1733

Deprecated: Use {@link #setAttribute}

Set the shadow of an element

#### Parameters:

• s Boolean

Boolean which determines whether the element has a shadow or not.

### showElement

() chainable

Make the element visible.

### snapToGrid

() chainable

Snaps the element to the grid. Only works for points, lines and circles. Points will snap to the grid as defined in their properties undefined and undefined. Lines and circles will snap their parent points to the grid, if they have undefined set to true.

#### Returns:

JXG.GeometryElement:

Reference to the element.

### snapToPoints

() chainable

Snaps the element to points. Only works for points. Points will snap to the next point as defined in their properties undefined and undefined. Lines and circles will snap their parent points to points.

#### Returns:

JXG.GeometryElement:

Reference to the element.

### startAnimation

(
• direction
• stepCount
)
chainable

Animate the point.

#### Parameters:

• direction Number

The direction the glider is animated. Can be +1 or -1.

• stepCount Number

The number of steps.

#### Returns:

JXG.CoordsElement:

This element

• Glider#stopAnimation

### stopAnimation

() chainable

Stop animation.

#### Returns:

JXG.CoordsElement:

This element

• Glider#startAnimation

### strokeColor

(
• sColor
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1626

Deprecated: Use {@link #setAttribute}

Set the strokeColor of an element

#### Parameters:

• sColor String

String which determines the stroke color of an object.

### strokeWidth

(
• width
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1641

Deprecated: Use {@link #setAttribute}

Set the strokeWidth of an element

#### Parameters:

• width Number

Integer which determines the stroke width of an outline.

### toJSON

() private

EXPERIMENTAL. Generate JSON object code of visProp and other properties.

#### Returns:

JSON string containing element's properties.

### update

() chainable

Update method. Position and content of the element are updated. The element is redrawn by a subsequent call of {@see #updateRenderer}. Can be used sometimes to commit changes to the object.

### updateConstraint

() private chainable

Dummy function for unconstrained points or gliders.

### updateCoords

(
• fromParents
)
private chainable

Updates the coordinates of the element. This method is called by the update method of the object. If the object is an image or text, in update the content of the object is updated and it's coordinates.

#### Parameters:

• fromParents Boolean

True if the update is a "regular" update, false if the element itself is dragged. In the latter case - and if the element is a glider - the relative position of the element, i.e. the properpty position has to be adjusted.

### updateGlider

() private chainable

Update of glider in case of dragging the glider or setting the postion of the glider. The relative position of the glider has to be updated.

In case of a glider on a line: If the second point is an ideal point, then -1 < this.position < 1, this.position==+/-1 equals point2, this.position==0 equals point1

If the first point is an ideal point, then 0 < this.position < 2 this.position==0 or 2 equals point1, this.position==1 equals point2

### updategliderFromParent

() private chainable

Update of a glider in case a parent element has been updated. That means the relative position of the glider stays the same.

### updateRenderer

() private chainable

Provide updateRenderer method.

### updateRendererGeneric

(
• rendererMethod
)
private chainable

This is the genneric method for calling the update emthod of the renderer (SVG, VML, ...). Additionally, it is checked if the coords are real.

#### Parameters:

• rendererMethod Function

The update method of the renderer (SVG, VML, ...) for this object.

### updateSize

() chainable

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 canvas an old IEs 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.

#### Returns:

JXG.Text:

Reference to the text object.

### updateTransform

() chainable

Applies the transformations of the element. This method applies to text and images. Point transformations are handled differently.

#### Returns:

JXG.CoordsElement:

This element

### utf8_decode

(
• string
)

Decode unicode entities into characters.

### visible

(
• v
)
deprecated chainable

Inherited from JXG.GeometryElement: src/base/element.js:1718

Deprecated: Use {@link #setAttribute}

Set the visibility of an element

#### Parameters:

• v Boolean

Boolean which determines whether the element is drawn.

### visit

(
• where
• time
• [options]
)
chainable

Starts an animated JXG.CoordsElement movement towards the given coordinates where. After arriving at where the JXG.CoordsElement moves back to where it started. The animation is done after time milliseconds.

#### Parameters:

• where Array

Array containing the x and y coordinate of the target location.

• time Number

Number of milliseconds the animation should last.

• [options] Object optional

Optional settings for the animation

• [callback] Function optional

A function that is called as soon as the animation is finished.

• [effect='<>'] String optional

animation effects like speed fade in and out. possible values are '<>' for speed increase on start and slow down at the end (default) and '--' for constant speed during the whole animation.

• [repeat=1] Number optional

How often this animation should be repeated.

#### Returns:

JXG.CoordsElement:

This element

• #animate

### X

()

Getter method for x, this is used by for CAS-points to access point coordinates.

#### Returns:

Number:

User coordinate of point in x direction.

### XEval

() private

Evaluation of the function term defining the x coordinate of the element. The value is stored in the coords object and returned by X(). This saves evaluation calls for CAS-points. Their XTerm() method is overwritten in undefined

#### Returns:

Number:

User coordinate of point in x direction.

### Y

()

Getter method for y, this is used by CAS-points to access point coordinates.

#### Returns:

Number:

User coordinate of point in y direction.

### YEval

() private

Evaluation of the function term defining the y coordinate of the element. The value is stored in the coords object and returned by Y(). This saves evaluation calls for CAS-points. Their YTerm() method is overwritten in undefined

#### Returns:

Number:

User coordinate of point in y direction.

### Z

()

Getter method for z, this is used by CAS-points to access point coordinates.

#### Returns:

Number:

User coordinate of point in z direction.

### ZEval

() private

Evaluation of the function term defining the z coordinate of the element. The value is stored in the coords object and returned by Z(). This saves evaluation calls for CAS-points. Their ZTerm() method is overwritten in undefined

#### Returns:

Number:

User coordinate of point in z direction.

## Properties

### _org_type

Number final

Original type of the element at construction time. Used for removing glider property.

### _pos

Number private

The position of this element inside the undefined.

Default: -1

### ancestors

Object

Elements on which this element depends on are stored here.

### baseElement

JXG.GeometryElement private

Default: null

### board

JXG.Board

Reference to the board associated with the element.

### childElements

Object

Stores all dependent objects to be updated when this point is moved.

String private

### coords

JXG.Coords private

Coordinates of the element.

### descendants

Object

Elements depending on this element are stored here.

### dump

Boolean

The element is saved with an explicit entry in the file (true) or implicitly via a composition.

Default: true

### element

JXG.CoordsElement private

Anchor element which define the origin for the relative coordinates. If defined the coordinates of the text are relative coordinates.

### elementClass

Number final

The element's class.

### elType

String

The string used with JXG.Board#create

### groups

Array private

Stores the groups of this element in an array of Group.

### hasLabel

Boolean

If element has a label subelement then this property will be set to true.

Default: false

Boolean private

Default: false

### highlighted

Boolean

True, if the element is currently highlighted.

Default: false

### id

String

Unique identifier for the element. Equivalent to id-attribute of renderer element.

### initialCoords

JXG.Coords private

Initial coordinates of the element. Needed for transformations

### isDraggable

Boolean

Controls if this element can be dragged. In GEONExT only free points and gliders can be dragged.

Default: false

### isReal

Boolean

If element is in two dimensional real space this is true, else false.

Default: true

### lastDragTime

Date

Time stamp containing the last time this element has been dragged.

Default: creation time

### methodMap

Object

The methodMap determines which methods can be called from within JessieCode and under which name it can be used. The map is saved in an object, the name of a property is the name of the method used in JessieCode, the value of a property is the name of the method in JavaScript.

### mouseover

Boolean

Is the mouse over this element?

Default: false

### name

String

Not necessarily unique name for the element.

Default: Name generated by {@link JXG.Board#generateName}.

### needsUpdate

Boolean

Controls if updates are necessary

Default: true

### needsUpdateFromParent

Boolean

A JXG.CoordsElement#updateGlider call is usually followed by a general JXG.Board#update which calls undefined. To prevent double updates, JXG.CoordsElement#needsUpdateFromParent is set to false in updateGlider() and reset to true in the following call to undefined

Default: true

### notExistingParents

Object

Stores all Intersection Objects which in this moment are not real and so hide this element.

### numTraces

Number

Counts the number of objects drawn as part of the trace of the element.

### onPolygon

Boolean private

Determines whether the element slides on a polygon if point is a glider.

Default: false

String private

### parents

Object

Ids of elements on which this element depends directly are stored here.

String private

### position

Number private

Relative position on a slide element (line, circle, curve) if element is a glider on this element.

### quadraticform

Array

Quadratic form representation of circles (and conics)

Default: [[1,0,0],[0,1,0],[0,0,1]]

### rendNode

Object

Stores the rendering node for the element.

### size

Array

Size of the text in screen view coordinates, i.e. pixel: [w, h].

### slideObject

JXG.GeometryElement

When used as a glider this member stores the object, where to glide on. To set the object to glide on use the method undefined and DO NOT set this property directly as it will break the dependency tree.

### slideObjects

Array

List of elements the element is bound to, i.e. the element glides on. Only the last entry is active. Use undefined to remove the currently active slideObject.

### stdform

Array

[c,b0,b1,a,k,r,q0,q1]

See A.E. Middleditch, T.W. Stacey, and S.B. Tor: "Intersection Algorithms for Lines and Circles", ACM Transactions on Graphics, Vol. 8, 1, 1989, pp 25-40.

The meaning of the parameters is: Circle: points p=[p0,p1] on the circle fulfill a<p,p> + <b,p> + c = 0 For convenience we also store r: radius k: discriminant = sqrt(<b,b>-4ac) q=[q0,q1] center

Points have radius = 0. Lines have radius = infinity. b: normalized vector, representing the direction of the line.

Should be put into Coords, when all elements possess Coords.

Default: [1, 0, 0, 0, 1, 1, 0, 0]

### subs

Object

Subs contains the subelements, created during the create method.

### symbolic

Object

Stores variables for symbolic computations

### traces

Object

Keeps track of all objects drawn as part of the trace of the element.

### transformations

Array

Stores the transformations which are applied during update in an array

### type

Number final

Type of the element.

### visProp

Object

An associative array containing all visual properties.

Default: empty object

## Events

### attribute

Notify everytime an attribute is changed.

• o Object

A list of changed attributes and their new value.

• el Object

Reference to the element

### attribute:<attribute>

This is a generic event handler. It exists for every possible attribute that can be set for any element, e.g. if you want to be notified everytime an element's strokecolor is changed, is the event attribute:strokecolor.

• val Object

The old value.

• nval Object

The new value

• el Object

Reference to the element

### down

Whenever the user starts to touch or click an element.

• e Event

The browser's event object.

### drag

This event is fired whenever the user drags an element.

• e Event

The browser's event object.

### mousedown

Whenever the user starts to click an element.

• e Event

The browser's event object.

### mousedrag

This event is fired whenever the user drags the element with a mouse.

• e Event

The browser's event object.

### mousemove

This event is fired whenever the user is moving the mouse over an element.

• e Event

The browser's event object.

### mouseout

This event is fired whenever the user puts the mouse away from an element.

• e Event

The browser's event object.

### mouseover

This event is fired whenever the user puts the mouse over an element.

• e Event

The browser's event object.

### mouseup

Whenever the user releases the mousebutton over an element.

• e Event

The browser's event object.

### move

This event is fired whenever the user is moving over an element.

• e Event

The browser's event object.

### out

This event is fired whenever the user is leaving an element.

• e Event

The browser's event object.

### over

This event is fired whenever the user is hovering over an element.

• e Event

The browser's event object.

### touchdown

Whenever the user starts to touch an element.

• e Event

The browser's event object.

### touchdrag

This event is fired whenever the user drags the element on a touch device.

• e Event

The browser's event object.

### touchup

Whenever the user stops touching an element.

• e Event

The browser's event object.

### up

Whenever the user stops to touch or click an element.

• e Event