# JSXGraph 1.7.0 Reference

## JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

Elements

Classes

- _global_
- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Boxplot
- Button
- Cardinalspline
- Chart
- Checkbox
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Comb
- Conic
- Curve
- Curve3D
- CurveDifference
- CurveIntersection
- CurveUnion
- Derivative
- Ellipse
- ForeignObject
- Functiongraph
- Functiongraph3D
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- ImplicitCurve
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.Board.infobox
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Chart
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Curve3D
- JXG.Dump
- JXG.EventEmitter
- JXG.Expect
- JXG.ForeignObject
- JXG.GeometryElement
- JXG.GeometryElement3D
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Legend
- JXG.Line
- JXG.Line3D
- JXG.Math
- JXG.Math.BoxQuadtree
- JXG.Math.Clip
- JXG.Math.Extrapolate
- JXG.Math.Geometry
- JXG.Math.ImplicitPlot
- JXG.Math.IntervalArithmetic
- JXG.Math.Metapost
- JXG.Math.Nlp
- JXG.Math.Numerics
- JXG.Math.Plot
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.ProbFuncs
- JXG.Math.Quadtree
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.NoRenderer
- JXG.Options
- JXG.Plane3D
- JXG.Point
- JXG.Point3D
- JXG.Polygon
- JXG.PrefixParser
- JXG.Server
- JXG.Server.modules
- JXG.Surface3D
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.View3D
- JXG.VMLRenderer
- JXG.XML
- Label
- Legend
- Line
- Line3D
- Locus
- MajorArc
- MajorSector
- Measurement
- Metapostspline
- Midpoint
- MinorArc
- MinorSector
- mirrorelement
- Mirrorpoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelogram
- Parallelpoint
- ParametricSurface3D
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Point
- Point3D
- PolarLine
- PolePoint
- Polygon
- PolygonalChain
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopefield
- Slopetriangle
- Smartlabel
- Spline
- Stepfunction
- Tangent
- Tapemeasure
- Text
- Ticks
- Tracecurve
- Transformation
- Turtle
- Vectorfield
- Vectorfield3D
- View3D

# Class JXG.GeometryElement

↳ JXG.GeometryElement

This is the basic class for geometry elements like points, circles and lines.
Defined in: element.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| JXG.GeometryElement(board, attributes, type, oclass) Constructs a new GeometryElement object.

Field Summary
Field Attributes | Field Name and Description
--- | ---
<private> <constant> | _org_type Original type of the element at construction time.
<private> | _pos The position of this element inside the JXG.Board#objectsList.
| ancestors Elements on which this element depends on are stored here.
<private> | baseElement
| board Reference to the board associated with the element.
| childElements Stores all dependent objects to be updated when this point is moved.
| dash Determines the elements border-style.
| dashScale If true, the dash pattern is multiplied by strokeWidth / 2.
| descendants Elements depending on this element are stored here.
| draft If draft.draft: true the element will be drawn in grey scale colors (as default) to visualize that it's only a draft.
| dragToTopOfLayer If the element is dragged it will be moved on mousedown or touchstart to the top of its layer.
| dump The element is saved with an explicit entry in the file (`true`) or implicitly via a composition.
<constant> | elementClass The element's class.
| elType The string used with JXG.Board#create
| fillColor The fill color of this geometry element.
| fillOpacity Opacity for fill color.
| fixed If true the element is fixed and can not be dragged around.
| frozen If true the element is fixed and can not be dragged around.
| gradient Gradient type.
| gradientAngle Angle (in radians) of the gradiant in case the gradient is of type 'linear'.
| gradientCX From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e.
| gradientCY From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e.
| gradientEndOffset The gradientEndOffset attribute is a number (ranging from 0 to 1) which indicates where the second gradient stop is placed, see the SVG specification for more information.
| gradientFR This attribute defines the radius of the start circle of the radial gradient.
| gradientFX ‘fx’ and ‘fy’ define the focal point for the radial gradient.
| gradientFY y-coordinate of the circle center for the second color in case of gradient 'radial'.
| gradientR From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e.
| gradientSecondColor Second color for gradient.
| gradientSecondOpacity Opacity of second gradient color.
| gradientStartOffset The gradientStartOffset attribute is a number (ranging from 0 to 1) which indicates where the first gradient stop is placed, see the SVG specification for more information.
| hasLabel If element has a label subelement then this property will be set to true.
| highlight
| highlighted True, if the element is currently highlighted.
| highlightFillColor The fill color of the given geometry element when the mouse is pointed over it.
| highlightFillOpacity Opacity for fill color when the object is highlighted.
| highlightStrokeColor The stroke color of the given geometry element when the user moves the mouse over it.
| highlightStrokeOpacity Opacity for stroke color when the object is highlighted.
| highlightStrokeWidth Width of the element's stroke when the mouse is pointed over it.
| id Unique identifier for the element.
| inherits Inherits contains the subelements, which may have an attribute (in particular the attribute "visible") having value 'inherit'.
| isDraggable Controls if this element can be dragged.
<private> | isLabel
| isReal If element is in two dimensional real space this is true, else false.
| lastDragTime Time stamp containing the last time this element has been dragged.
| layer Display layer which will contain the element.
| lineCap Line endings (linecap) of a stroke element, i.e.
| methodMap The methodMap determines which methods can be called from within JessieCode and under which name it can be used.
| mouseover Is the mouse over this element?
| name Not necessarily unique name for the element.
| needsRegularUpdate If this is set to true, the element is updated in every update call of the board.
| needsUpdate Controls if updates are necessary
| notExistingParents Stores all Intersection Objects which in this moment are not real and so hide this element.
| numTraces Counts the number of objects drawn as part of the trace of the element.
| parents Ids of elements on which this element depends directly are stored here.
| precision Precision options for JSXGraph elements.
| priv A private element will be inaccessible in certain environments, e.g.
| quadraticform Quadratic form representation of circles (and conics)
| rendNode Stores the SVG (or VML) rendering node for the element.
| rotatable Determines whether two-finger manipulation may rotate this object.
| scalable Determines whether two-finger manipulation of this object may change its size.
| shadow If enabled:true the (stroke) element will get a customized shadow.
| snapToGrid Snaps the element or its parents to the grid.
| stdform [c, b0, b1, a, k, r, q0, q1] See A.E.
| strokeColor The stroke color of the given geometry element.
| strokeOpacity Opacity for element's stroke color.
| strokeWidth Width of the element's stroke.
| subs Subs contains the subelements, created during the create method.
| symbolic Stores variables for symbolic computations
| tabindex Controls if an element can get the focus with the tab key.
| trace If true the element will be traced, i.e.
| traceAttributes Extra visual properties for traces of an element
| traces Keeps track of all objects drawn as part of the trace of the element.
| transformations Stores the transformations which are applied during update in an array
| transitionDuration Transition duration (in milliseconds) for certain cahnges of properties like color and opacity.
| transitionProperties Properties which change smoothly in the time set in transitionDuration.
<constant> | type Type of the element.
| viewport Set individual viewport for an element.
| visible If false the element won't be visible on the board, otherwise it is shown.
| visProp An associative array containing all visual properties.
| visPropCalc An associative array containing visual properties which are calculated from the attribute values (i.e.
| withLabel If true a label will display the element's name.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | _set(key, value) Sets the value of attribute `key` to `value`.
| addChild(obj) Add an element as a child to the current element.
<private> | addDescendants(obj)
<static> | JXG.GeometryElement.addEvent() Alias of JXG.EventEmitter.on.
| addParents(parents) Adds ids of elements to the array this.parents.
<private> | addParentsFromJCFunctions(function_array) Add dependence on elements in JessieCode functions.
| addRotation(angle) Rotate texts or images by a given degree.
| addTicks(ticks) Adds ticks to this line or curve.
| addTransform(transform) Add transformations to this element.
| animate(hash, time, options) Animates properties for that object like stroke or fill color, opacity and maybe even more later.
| bounds() Dimensions of the smallest rectangle enclosing the element.
| clearTrace() Removes all objects generated by the trace function.
| cloneToBackground() Copy the element to background.
<private> | countChildren() Counts the direct children of an object without counting labels.
<private> | createGradient() Creates a gradient nodes in the renderer.
| createLabel() Creates a label element for this geometry element.
<private> | draggable() Decides whether an element can be dragged.
| formatNumberLocale(value, digits) Format a number according to the locale set in the attribute "intl".
<private> | fullUpdate(visible) Run through the full update chain of an element.
| generatePolynomial() Array of strings containing the polynomials defining the element.
| getAttribute(key) Get the value of the property `key`.
| getAttributes() Retrieve a copy of the current visProp.
| getLabelAnchor() Returns the coords object where the label of the element shall be drawn.
| getName() Returns the elements name.
| getParents() List of the element ids resp.
<deprecated> | getProperty() Deprecated alias for JXG.GeometryElement#getAttribute.
<private> | getSnapSizes() Determine values of snapSizeX and snapSizeY.
| getTextAnchor() Returns the coords object where a text that is bound to the element shall be drawn.
| getType() The type of the element as used in JXG.Board#create.
| handleSnapToGrid(force, fromParent) Move an element to its nearest grid point.
| hasPoint(x, y) Checks whether (x,y) is near the element.
| hide() Hide the element.
| hideElement() Hide the element.
| noHighlight() Uses the "normal" properties of the element.
<private> | normalize() Normalize the element's standard form.
<private> | prepareUpdate() Notify all child elements for updates.
| remove() Removes the element from the construction.
| removeAllTicks() Removes all ticks from a line or curve.
| removeChild(obj) Remove an element as a child from the current element.
<private> | removeDescendants(obj) Removes the given object from the descendants list of this object and all its child objects.
<static> | JXG.GeometryElement.removeEvent() Alias of JXG.EventEmitter.off.
| removeTicks(tick) Removes ticks identified by parameter named tick from this line or curve.
<private> | resolveShortcuts(attributes) Resolves attribute shortcuts like `color` and expands them, e.g.
| setArrow(firstArrow, lastArrow) Determines whether the element has arrows at start or end of the arc.
| setAttribute(attributes) Sets an arbitrary number of attributes.
<private> | setDash(dash) Set the dash style of an object.
<private> | setDisplayRendNode(val) Show the element or hide it.
| setLabel(str) Sets a label and its text If label doesn't exist, it creates one
| setLabelText(str) Updates the element's label text, strips all html.
| setName(str) Updates the element's label text and the element's attribute "name", strips all html.
| setParents(parents) Sets ids of elements to the array this.parents.
| setPosition(method, coords) Translates the object by `(x, y)`.
| setPositionDirectly(method, coords, oldcoords) Moves an element by the difference of two coordinates.
<deprecated> | setProperty() Deprecated alias for JXG.GeometryElement#setAttribute.
| show() Make the element visible.
| showElement() Make the element visible.
<private> | snapToPoints() Snaps the element to points.
| update() General update method.
<private> | updateRenderer() Provide updateRenderer method.
<private> | updateVisibility(parent_val) Set the visibility of an element.
| useLocale() Checks if locale is enabled in the attribute.

Event Summary
Event Attributes | Event Name and Description
--- | ---
| attribute(o, el) Notify every time an attribute is changed.
| attribute:key(val, nval, el) This is a generic event handler.
| down(e) Whenever the user starts to touch or click an element.
| drag(e) This event is fired whenever the user drags an element.
| keydrag(e) This event is fired whenever the user drags the element by pressing arrow keys on the keyboard.
| mousedown(e) Whenever the user starts to click an element.
| mousedrag(e) This event is fired whenever the user drags the element with a mouse.
| mousemove(e) This event is fired whenever the user is moving the mouse over an element.
| mouseout(e) This event is fired whenever the user puts the mouse away from an element.
| mouseover(e) This event is fired whenever the user puts the mouse over an element.
| mouseup(e) Whenever the user releases the mousebutton over an element.
| move(e) This event is fired whenever the user is moving over an element.
| out(e) This event is fired whenever the user is leaving an element.
| over(e) This event is fired whenever the user is hovering over an element.
| pendown(e) Whenever the user taps an element with the pen.
| pendrag(e) This event is fired whenever the user drags the element with a pen.
| penup(e) Whenever the user lifts the pen over an element.
| touchdown(e) Whenever the user starts to touch an element.
| touchdrag(e) This event is fired whenever the user drags the element on a touch device.
| touchup(e) Whenever the user stops touching an element.
| up(e) Whenever the user stops to touch or click an element.

Class Detail
JXG.GeometryElement(board, attributes, type, oclass)
Constructs a new GeometryElement object.

Parameters:
{JXG.Board} board
  Reference to the board the element is constructed on.
{Object} attributes
  Hash of attributes and their values.
{Number} type
  Element type (a `JXG.OBJECT_TYPE_` value).
{Number} oclass
  The element's class (a `JXG.OBJECT_CLASS_` value).

Field Detail
<private> <constant> {Number} _org_type
Original type of the element at construction time. Used for removing glider property.

<private> {Number} _pos
The position of this element inside the JXG.Board#objectsList.

Default Value:
  -1

{Object} ancestors
Elements on which this element depends on are stored here.

<private> {JXG.GeometryElement} baseElement

Default Value:
  null

{JXG.Board} board
Reference to the board associated with the element.

{Object} childElements
Stores all dependent objects to be updated when this point is moved.

{Number} dash
Determines the elements border-style. Possible values are:

- 0 for a solid line
- 1 for a dotted line
- 2 for a line with small dashes
- 3 for a line with medium dashes
- 4 for a line with big dashes
- 5 for a line with alternating medium and big dashes and large gaps
- 6 for a line with alternating medium and big dashes and small gaps
- 7 for a dotted line. Needs JXG.GeometryElement#linecap set to "round" for round dots.

The dash patterns are defined in JXG.AbstractRenderer#dashArray.
Defined in: options.js.

See:
  JXG.GeometryElement#lineCap
  JXG.AbstractRenderer#dashArray

Default Value:
  0

{Boolean} dashScale
If true, the dash pattern is multiplied by strokeWidth / 2.
Defined in: options.js.

See:
  JXG.GeometryElement#dash
  JXG.AbstractRenderer#dashArray

Default Value:
  false

{Object} descendants
Elements depending on this element are stored here.

{Object} draft
If draft.draft: true the element will be drawn in grey scale colors (as default) to visualize that it's only a draft.
Defined in: options.js.

{Boolean} dragToTopOfLayer
If the element is dragged it will be moved on mousedown or touchstart to the top of its layer. Works only for SVG renderer and for simple elements consisting of one SVG node.
Defined in: options.js.

    var li1 = board.create('line', [1, 1, 1], {strokeWidth: 20, dragToTopOfLayer: true});
    var li2 = board.create('line', [1, -1, 1], {strokeWidth: 20, strokeColor: 'red'});

Default Value:
  false

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

Default Value:
  true

<constant> {Number} elementClass
The element's class.

{String} elType
The string used with JXG.Board#create

{String} fillColor
The fill color of this geometry element.
Defined in: options.js.

See:
  JXG.GeometryElement#highlightFillColor
  JXG.GeometryElement#fillOpacity
  JXG.GeometryElement#highlightFillOpacity

{Number} fillOpacity
Opacity for fill color.
Defined in: options.js.

See:
  JXG.GeometryElement#fillColor
  JXG.GeometryElement#highlightFillColor
  JXG.GeometryElement#highlightFillOpacity

{Boolean} fixed
If true the element is fixed and can not be dragged around. The element will be repositioned on zoom and moveOrigin events.
Defined in: options.js.

Default Value:
  false

{Boolean} frozen
If true the element is fixed and can not be dragged around. The element will even stay at its position on zoom and moveOrigin events. Only free elements like points, texts, curves can be frozen.
Defined in: options.js.

Default Value:
  false

{String} gradient
Gradient type. Possible values are 'linear'. 'radial' or null.
Defined in: options.js.

        var a = board.create('slider', [[0, -0.2], [3.5, -0.2], [0, 0, 2 * Math.PI]], {name: 'angle'});
        var b = board.create('slider', [[0, -0.4], [3.5, -0.4], [0, 0, 1]], {name: 'offset1'});
        var c = board.create('slider', [[0, -0.6], [3.5, -0.6], [0, 1, 1]], {name: 'offset2'});

        var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
                    fillOpacity: 1,
                    fillColor: 'yellow',
                    gradient: 'linear',
                    gradientSecondColor: 'blue',
                    gradientAngle: function() { return a.Value(); },
                    gradientStartOffset: function() { return b.Value(); },
                    gradientEndOffset: function() { return c.Value(); },
                    hasInnerPoints: true
            });

        var cx = board.create('slider', [[0, -.2], [3.5, -.2], [0, 0.5, 1]], {name: 'cx, cy'});
        var fx = board.create('slider', [[0, -.4], [3.5, -.4], [0, 0.5, 1]], {name: 'fx, fy'});
        var o1 = board.create('slider', [[0, -.6], [3.5, -.6], [0, 0.0, 1]], {name: 'offset1'});
        var o2 = board.create('slider', [[0, -.8], [3.5, -.8], [0, 1, 1]], {name: 'offset2'});
        var r = board.create('slider', [[0, -1], [3.5, -1], [0, 0.5, 1]], {name: 'r'});
        var fr = board.create('slider', [[0, -1.2], [3.5, -1.2], [0, 0, 1]], {name: 'fr'});

        var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
                    fillOpacity: 1,
                    fillColor: 'yellow',
                    gradient: 'radial',
                    gradientSecondColor: 'blue',
                    gradientCX: function() { return cx.Value(); },
                    gradientCY: function() { return cx.Value(); },
                    gradientR: function() { return r.Value(); },
                    gradientFX: function() { return fx.Value(); },
                    gradientFY: function() { return fx.Value(); },
                    gradientFR: function() { return fr.Value(); },
                    gradientStartOffset: function() { return o1.Value(); },
                    gradientEndOffset: function() { return o2.Value(); },
                    hasInnerPoints: true
        });

See:
  JXG.GeometryElement#gradientSecondColor
  JXG.GeometryElement#gradientSecondOpacity

Default Value:
  null

{Number} gradientAngle
Angle (in radians) of the gradiant in case the gradient is of type 'linear'. If the angle is 0, the first color is on the left and the second color is on the right. If the angle is π/2 the first color is on top and the second color at the bottom.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient

Default Value:
  0

{Number} gradientCX
From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient. The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle. For radial gradients in canvas this is the value 'x1'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientCY
  JXG.GeometryElement#gradientR

Default Value:
  0.5

{Number} gradientCY
From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient. The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle. For radial gradients in canvas this is the value 'y1'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientCX
  JXG.GeometryElement#gradientR

Default Value:
  0.5

{Number} gradientEndOffset
The gradientEndOffset attribute is a number (ranging from 0 to 1) which indicates where the second gradient stop is placed, see the SVG specification for more information. For linear gradients, this attribute represents a location along the gradient vector. For radial gradients, it represents a percentage distance from (fx,fy) to the edge of the outermost/largest circle.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientStartOffset

Default Value:
  1.0

{Number} gradientFR
This attribute defines the radius of the start circle of the radial gradient. The gradient will be drawn such that the 0% <stop> is mapped to the perimeter of the start circle. For radial gradients in canvas this is the value 'r0'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientFX
  JXG.GeometryElement#gradientFY

Default Value:
  0.0

{Number} gradientFX
‘fx’ and ‘fy’ define the focal point for the radial gradient. The gradient will be drawn such that the 0% gradient stop is mapped to (fx, fy). For radial gradients in canvas this is the value 'x0'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientFY
  JXG.GeometryElement#gradientFR

Default Value:
  0.5

{Number} gradientFY
y-coordinate of the circle center for the second color in case of gradient 'radial'. (The attribute fy in SVG) For radial gradients in canvas this is the value 'y0'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientFX
  JXG.GeometryElement#gradientFR

Default Value:
  0.5

{Number} gradientR
From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient. The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle. For radial gradients in canvas this is the value 'r1'. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientCX
  JXG.GeometryElement#gradientCY

Default Value:
  0.5

{String} gradientSecondColor
Second color for gradient.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientSecondOpacity

Default Value:
  '#ffffff'

{Number} gradientSecondOpacity
Opacity of second gradient color. Takes a value between 0 and 1.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientSecondColor

Default Value:
  1

{Number} gradientStartOffset
The gradientStartOffset attribute is a number (ranging from 0 to 1) which indicates where the first gradient stop is placed, see the SVG specification for more information. For linear gradients, this attribute represents a location along the gradient vector. For radial gradients, it represents a percentage distance from (fx,fy) to the edge of the outermost/largest circle.
Defined in: options.js.

See:
  JXG.GeometryElement#gradient
  JXG.GeometryElement#gradientEndOffset

Default Value:
  0.0

{Boolean} hasLabel
If element has a label subelement then this property will be set to true.

Default Value:
  false

{Boolean} highlight
Defined in: options.js.

Default Value:
  true

{Boolean} highlighted
True, if the element is currently highlighted.

Default Value:
  false

{String} highlightFillColor
The fill color of the given geometry element when the mouse is pointed over it.
Defined in: options.js.

See:
  JXG.GeometryElement#fillColor
  JXG.GeometryElement#fillOpacity
  JXG.GeometryElement#highlightFillOpacity

{Number} highlightFillOpacity
Opacity for fill color when the object is highlighted.
Defined in: options.js.

See:
  JXG.GeometryElement#fillColor
  JXG.GeometryElement#highlightFillColor
  JXG.GeometryElement#fillOpacity

{String} highlightStrokeColor
The stroke color of the given geometry element when the user moves the mouse over it.
Defined in: options.js.

See:
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#strokeWidth
  JXG.GeometryElement#strokeOpacity
  JXG.GeometryElement#highlightStrokeOpacity

{Number} highlightStrokeOpacity
Opacity for stroke color when the object is highlighted.
Defined in: options.js.

See:
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeWidth
  JXG.GeometryElement#strokeOpacity

{Number} highlightStrokeWidth
Width of the element's stroke when the mouse is pointed over it.
Defined in: options.js.

See:
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeOpacity
  JXG.GeometryElement#highlightStrokeOpacity
  JXG.GeometryElement#highlightFillColor

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

{Object} inherits
Inherits contains the subelements, which may have an attribute (in particular the attribute "visible") having value 'inherit'.

{Boolean} isDraggable
Controls if this element can be dragged. In GEONExT only free points and gliders can be dragged.

Default Value:
  false

<private> isLabel
Defined in: options.js.

Default Value:
  false

{Boolean} isReal
If element is in two dimensional real space this is true, else false.

Default Value:
  true

{Date} lastDragTime
Time stamp containing the last time this element has been dragged.

Default Value:
  creation time

layer
Display layer which will contain the element.
Defined in: options.js.

See:
  JXG.Options#layer

Default Value:
  See JXG.Options#layer

{String} lineCap
Line endings (linecap) of a stroke element, i.e. line, circle, curve. Possible values are:

- 'butt',
- 'round',
- 'square'.

Not available for VML renderer.
Defined in: options.js.

Default Value:
  'butt'

{Object} methodMap
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.

{Boolean} mouseover
Is the mouse over this element?

Default Value:
  false

{String} name
Not necessarily unique name for the element.

See:
  JXG.Board#generateName

Default Value:
  Name generated by JXG.Board#generateName.

{Boolean} needsRegularUpdate
If this is set to true, the element is updated in every update call of the board. If set to false, the element is updated only after zoom events or more generally, when the bounding box has been changed. Examples for the latter behavior should be axes.
Defined in: options.js.

See:
  JXG.GeometryElement#needsRegularUpdate

Default Value:
  true

{Boolean} needsUpdate
Controls if updates are necessary

Default Value:
  true

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

{Number} numTraces
Counts the number of objects drawn as part of the trace of the element.

See:
  JXG.GeometryElement#clearTrace
  JXG.GeometryElement#traces

{Object} parents
Ids of elements on which this element depends directly are stored here.

precision
Precision options for JSXGraph elements. This attributes takes either the value 'inherit' or an object of the form:

    precision: {
         touch: 30,
         mouse: 4,
         pen: 4
    }

In the first case, the global, JSXGraph-wide values of JXGraph.Options.precision are taken.
Defined in: options.js.

See:
  JXG.Options#precision

Default Value:
  'inherit'

{Boolean} priv
A private element will be inaccessible in certain environments, e.g. a graphical user interface.
Defined in: options.js.

Default Value:
  false

{Array} quadraticform
Quadratic form representation of circles (and conics)

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

{Object} rendNode
Stores the SVG (or VML) rendering node for the element. This enables low-level access to SVG nodes. The properties of such an SVG node can then be changed by calling setAttribute(). Note that there are a few elements which consist of more than one SVG nodes:

- Elements with arrow tail or head: rendNodeTriangleStart, rendNodeTriangleEnd
- SVG (or VML) texts: rendNodeText
- Button: rendNodeForm, rendNodeButton, rendNodeTag
- Checkbox: rendNodeForm, rendNodeCheckbox, rendNodeLabel, rendNodeTag
- Input: rendNodeForm, rendNodeInput, rendNodeLabel, rendNodeTag

Here is are two examples: The first example shows how to access the SVG node, the second example demonstrates how to change SVG attributes.

        var p1 = board.create('point', [0, 0]);
        console.log(p1.rendNode);
        // returns the full SVG node details of the point p1, something like:
        // <ellipse id='box_jxgBoard1P6' stroke='#ff0000' stroke-opacity='1' stroke-width='2px'
        //   fill='#ff0000' fill-opacity='1' cx='250' cy='250' rx='4' ry='4'
        //   style='position: absolute;'>
        // </ellipse>

        var s = board.create('segment', [p1, p2], {strokeWidth: 60});
        s.rendNode.setAttribute('stroke-linecap', 'round');

{Boolean} rotatable
Determines whether two-finger manipulation may rotate this object. If set to false, the object can only be scaled and translated.

In case the element is a polygon or line and it has the attribute "rotatable:false", moving the element with two fingers results in a rotation or translation.

If an element is set to be neither scalable nor rotatable, it can only be translated.

In case of a polygon, scaling is only possible if no vertex has snapToGrid or snapToPoints enabled and no vertex is fixed by some other constraint. Also, the polygon itself has to have snapToGrid disabled.
Defined in: options.js.

See:
  JXG.GeometryElement#scalable

Default Value:
  true

{Boolean} scalable
Determines whether two-finger manipulation of this object may change its size. If set to false, the object is only rotated and translated.

In case the element is a horizontal or vertical line having ticks, "scalable:true" enables zooming of the board by dragging ticks lines. This feature is enabled, for the ticks element of the line element the attribute "fixed" has to be false and the line element's scalable attribute has to be true.

In case the element is a polygon or line and it has the attribute "scalable:false", moving the element with two fingers results in a rotation or translation.

If an element is set to be neither scalable nor rotatable, it can only be translated.

In case of a polygon, scaling is only possible if no vertex has snapToGrid or snapToPoints enabled and no vertex is fixed by some other constraint. Also, the polygon itself has to have snapToGrid disabled.
Defined in: options.js.

See:
  JXG.Ticks#fixed
  JXG.GeometryElement#rotatable

Default Value:
  true

{Object} shadow
If enabled:true the (stroke) element will get a customized shadow.

Customize color and opacity: If the object's RGB stroke color is `[r,g,b]` and its opacity is `op, and the shadow parameters color is given as `[r', g', b']` and opacity as `op'` the shadow will receive the RGB color`

`[blend*r + r', blend*g + g', blend*b + b']`
and its opacity will be equal to `op * op'`. Further, the parameters blur and offset can be adjusted.

This attribute is only available with SVG, not with canvas.
Defined in: options.js.

    board.options.line.strokeWidth = 2
    // No shadow
    var li1 = board.create('line', [[-2, 5], [2, 6]], {strokeColor: 'red', shadow: false});

    // Default shadow
    var li2 = board.create('line', [[-2, 3], [2, 4]], {strokeColor: 'red', shadow: true});

    // No shadow
    var li3 = board.create('line', [[-2, 1], [2, 2]], {strokeColor: 'blue', shadow: {enabled: false}});

    // Shadow uses same color as line
    var li4 = board.create('line', [[-2, -1], [2, 0]], {strokeColor: 'blue',
                shadow: {enabled: true, color: '#000000', blend: 1}
            });

    // Shadow color as a mixture between black and the line color, additionally set opacity
    var li5 = board.create('line', [[-2, -3], [2, -2]], {strokeColor: 'blue',
                shadow: {enabled: true, color: '#000000', blend: 0.5, opacity: 0.5}
            });

    // Use different value for blur and offset [dx, dy]
    var li6 = board.create('line', [[-2, -5], [2, -4]], {strokeColor: 'blue',
                shadow: {enabled: true, offset:[0, 25], blur: 6}
            });

Default Value:
  shadow: { enabled: false, color: [0, 0, 0], opacity: 1, blur: 3, blend: 0.1, offset: [5, 5] }

{Boolean} snapToGrid
Snaps the element or its parents to the grid. Currently only relevant for points, circles, and lines. Points are snapped to grid directly, on circles and lines it's only the parent points that are snapped
Defined in: options.js.

Default Value:
  false

{Array} stdform
[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 Value:
  [1, 0, 0, 0, 1, 1, 0, 0]

{String} strokeColor
The stroke color of the given geometry element.
Defined in: options.js.

See:
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeWidth
  JXG.GeometryElement#strokeOpacity
  JXG.GeometryElement#highlightStrokeOpacity

{Number} strokeOpacity
Opacity for element's stroke color.
Defined in: options.js.

See:
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeWidth
  JXG.GeometryElement#highlightStrokeOpacity

{Number} strokeWidth
Width of the element's stroke.
Defined in: options.js.

See:
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeOpacity
  JXG.GeometryElement#highlightStrokeOpacity

{Object} subs
Subs contains the subelements, created during the create method.

{Object} symbolic
Stores variables for symbolic computations

{Number} tabindex
Controls if an element can get the focus with the tab key. tabindex corresponds to the HTML attribute of the same name. See description at MDN. The additional value "null" completely disables focus of an element. The value will be ignored if keyboard control of the board is not enabled or the element is fixed or not visible.
Defined in: options.js.

See:
  JXG.Board#keyboard
  JXG.GeometryElement#fixed
  JXG.GeometryElement#visible

Default Value:
  0

{Boolean|String} trace
If true the element will be traced, i.e. on every movement the element will be copied to the background. Use JXG.GeometryElement#clearTrace to delete the trace elements. The calling of element.setAttribute({trace:false}) additionally deletes all traces of this element. By calling element.setAttribute({trace:'pause'}) the removal of already existing traces can be prevented. The visual appearance of the trace can be influenced by JXG.GeometryElement#traceAttributes.
Defined in: options.js.

See:
  JXG.GeometryElement#clearTrace
  JXG.GeometryElement#traces
  JXG.GeometryElement#numTraces
  JXG.GeometryElement#traceAttributes

Default Value:
  false

{Object} traceAttributes
Extra visual properties for traces of an element
Defined in: options.js.

    JXG.Options.elements.traceAttributes = {
        size: 2
    };

    const board = JXG.JSXGraph.initBoard(BOARDID, {
        boundingbox: [-4, 4, 4, -4],
        keepaspectratio: true
    });

    var p = board.create('point', [0.0, 2.0], {
        trace: true,
        size: 10,
        traceAttributes: {
            color: 'black',
            face: 'x'
        }
    });

See:
  JXG.GeometryElement#trace

{Object} traces
Keeps track of all objects drawn as part of the trace of the element.

See:
  JXG.GeometryElement#clearTrace
  JXG.GeometryElement#numTraces

{Array} transformations
Stores the transformations which are applied during update in an array

See:
  JXG.Transformation

{Number} transitionDuration
Transition duration (in milliseconds) for certain cahnges of properties like color and opacity. The properties can be set in the attribute transitionProperties Works in SVG renderer, only.
Defined in: options.js.

See:
  JXG.GeometryElement#transitionProperties
  JXG.GeometryElement#strokeColor
  JXG.GeometryElement#highlightStrokeColor
  JXG.GeometryElement#strokeOpacity
  JXG.GeometryElement#highlightStrokeOpacity
  JXG.GeometryElement#fillColor
  JXG.GeometryElement#highlightFillColor
  JXG.GeometryElement#fillOpacity
  JXG.GeometryElement#highlightFillOpacity

Default Value:
  100 JXG.Options.elements#transitionDuration

{Array} transitionProperties
Properties which change smoothly in the time set in transitionDuration. Possible values are ['fill', 'fill-opacity', 'stroke', 'stroke-opacity', 'stroke-width', 'width', 'height', 'rx', 'ry'] (and maybe more) for geometry elements and ['color', 'opacity', 'all'] for HTML texts.
Defined in: options.js.

    var p1 = board.create("point", [0, 2], {
        name: "A",
        highlightStrokeWidth: 10,
        transitionDuration: 1000,
        transitionProperties: ['width', 'height', 'stroke-width',
            'fill', 'fill-opacity', 'rx', 'ry', 'stroke', 'stroke-opacity'] });

See:
  JXG.GeometryElement#transitionDuration

<constant> {Number} type
Type of the element.

viewport
Set individual viewport for an element. If not set to 'inherit', to use the board-wide viewport, an array of the form '[left, top, right, bottom]' has to be given.
Defined in: options.js.

See:
  JXG.Board#viewport

Default Value:
  'inherit'

{Boolean} visible
If false the element won't be visible on the board, otherwise it is shown.
Defined in: options.js.

See:
  JXG.GeometryElement#hideElement
  JXG.GeometryElement#showElement

Default Value:
  true

{Object} visProp
An associative array containing all visual properties.

Default Value:
  empty object

{Object} visPropCalc
An associative array containing visual properties which are calculated from the attribute values (i.e. visProp) and from other constraints. An example: if an intersection point does not have real coordinates, visPropCalc.visible is set to false. Additionally, the user can control visibility with the attribute "visible", even by supplying a functions as value.

Default Value:
  empty object

{Boolean} withLabel
If true a label will display the element's name. Using this to suppress labels is more efficient than visible:false.
Defined in: options.js.

Default Value:
  false

Method Detail
<private> _set(key, value)
Sets the value of attribute `key` to `value`.

Parameters:
{String} key
  The attribute's name.
value
  The new value

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

Parameters:
{JXG.GeometryElement} obj
  The dependent object.

<private> addDescendants(obj)

Parameters:
{JXG.GeometryElement} obj
  The element that is to be added to the descendants list.

Returns:
  this

<static> JXG.GeometryElement.addEvent()
Alias of JXG.EventEmitter.on.

{JXG.Object} addParents(parents)
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 refers to coordinates of a point, calling addParents() is necessary.

Parameters:
{Array} parents
  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.

Examples:

    // 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});
    f.addParents([A, B]);

<private> {JXG.Object} addParentsFromJCFunctions(function_array)
Add dependence on elements in JessieCode functions.

Parameters:
{Array} function_array
  Array of functions containing potential properties "deps" with elements the function depends on.

Returns:
  {JXG.Object} reference to the object itself

addRotation(angle)
Rotate texts or images by a given degree.

Parameters:
{number} angle
  The degree of the rotation (90 means vertical text).

See:
  JXG.GeometryElement#rotate

{String} addTicks(ticks)
Adds ticks to this line or curve. Ticks can be added to a curve or any kind of line: line, arrow, and axis.

Parameters:
{JXG.Ticks} ticks
  Reference to a ticks object which is describing the ticks (color, distance, how many, etc.).

Returns:
  {String} Id of the ticks object.

{JXG.GeometryElement} addTransform(transform)
Add transformations to this element.

Parameters:
{JXG.Transformation|Array} transform
  Either one JXG.Transformation or an array of JXG.Transformations.

Returns:
  {JXG.GeometryElement} Reference to the element.

{JXG.GeometryElement} animate(hash, time, options)
Animates properties for that object like stroke or fill color, opacity and maybe even more later.

Parameters:
{Object} hash
  Object containing properties with target values for the animation.
{number} time
  Number of milliseconds to complete the animation.
{Object} options 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

{Array, Array} 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 JXG.Board#setBoundingBox.
  {Array} similar to JXG.Board#setBoundingBox.

clearTrace()
Removes all objects generated by the trace function.

{JXG.GeometryElement} cloneToBackground()
Copy the element to background. This is used for tracing elements.

Returns:
  {JXG.GeometryElement} A reference to the element

<private> {number} countChildren()
Counts the direct children of an object without counting labels.

Returns:
  {number} Number of children

<private> createGradient()
Creates a gradient nodes in the renderer.

See:
  JXG.SVGRenderer#setGradient

createLabel()
Creates a label element for this geometry element.

See:
  #addLabelToElement

<private> {boolean} draggable()
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.

Returns:
  {boolean}

{String|Number} formatNumberLocale(value, digits)
Format a number according to the locale set in the attribute "intl". If in the options of the intl-attribute "maximumFractionDigits" is not set, the optional parameter digits is used instead. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat for more information about internationalization.

Parameters:
{Number} value
  Number to be formatted
{Number} digits Optional, Default: undefined
  Optional number of digits

Returns:
  {String|Number} string containing the formatted number according to the locale or the number itself of the formatting is not possible.

<private> {JXG.GeometryElement} fullUpdate(visible)
Run through the full update chain of an element.

Parameters:
{Boolean} visible
  Set visibility in case the elements attribute value is 'inherit'. null is allowed.

Returns:
  {JXG.GeometryElement} Reference to the element

{Array} 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.

getAttribute(key)
Get the value of the property `key`.

Parameters:
{String} key
  The name of the property you are looking for

Returns:
  The value of the property

{Object} getAttributes()
Retrieve a copy of the current visProp.

Returns:
  {Object}

{JXG.Coords} 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.

See:
  JXG.GeometryElement#getTextAnchor

{String} getName()
Returns the elements name. Used in JessieCode.

Returns:
  {String}

{Array} getParents()
List of the element ids resp. values used as parents in JXG.Board#create.

Returns:
  {Array}

getProperty()
Deprecated alias for JXG.GeometryElement#getAttribute.

Deprecated:
Use JXG.GeometryElement#getAttribute.

<private> {Array} getSnapSizes()
Determine values of snapSizeX and snapSizeY. If the attributes snapSizex and snapSizeY are greater than zero, these values are taken. Otherwise, determine the distance between major ticks of the default axes.

Returns:
  {Array} containing the snap sizes for x and y direction.

{JXG.Coords} 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.

See:
  JXG.GeometryElement#getLabelAnchor

{String} getType()
The type of the element as used in JXG.Board#create.

Returns:
  {String}

{JXG.GeometryElement} handleSnapToGrid(force, fromParent)
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 or if the object is fixed, nothing is done.

Parameters:
{Boolean} force
  force snapping independent from what the snaptogrid attribute says
{Boolean} fromParent
  True if the drag comes from a child element. This is the case if a line through two points is dragged. In this case we do not try to force the points to stay inside of the visible board, but the distance between the two points stays constant.

Returns:
  {JXG.GeometryElement} Reference to this element

{Boolean} hasPoint(x, y)
Checks whether (x,y) is near the element.

Parameters:
{Number} x
  Coordinate in x direction, screen coordinates.
{Number} y
  Coordinate in y direction, screen coordinates.

Returns:
  {Boolean} True if (x,y) is near the element, False otherwise.

{JXG.GeometryElement} hide()
Hide the element. It will still exist but not be visible on the board. Alias for "element.setAttribute({visible: false});"

Returns:
  {JXG.GeometryElement} Reference to the element

{JXG.GeometryElement} hideElement()
Hide the element. It will still exist but not be visible on the board. Alias for JXG.GeometryElement#hide

Returns:
  {JXG.GeometryElement} Reference to the element

{JXG.Board} noHighlight()
Uses the "normal" properties of the element.

Returns:
  {JXG.Board}

<private> normalize()
Normalize the element's standard form.

<private> prepareUpdate()
Notify all child elements for updates.

remove()
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.

removeAllTicks()
Removes all ticks from a line or curve.

{JXG.Object} removeChild(obj)
Remove an element as a child from the current element.

Parameters:
{JXG.GeometryElement} obj
  The dependent object.

Returns:
  {JXG.Object} reference to the object itself

<private> {JXG.Object} removeDescendants(obj)
Removes the given object from the descendants list of this object and all its child objects.

Parameters:
{JXG.GeometryElement} obj
  The element that is to be removed from the descendants list.

Returns:
  {JXG.Object} reference to the object itself

<static> JXG.GeometryElement.removeEvent()
Alias of JXG.EventEmitter.off.

removeTicks(tick)
Removes ticks identified by parameter named tick from this line or curve.

Parameters:
{JXG.Ticks} tick
  Reference to tick object to remove.

<private> {Object} resolveShortcuts(attributes)
Resolves attribute shortcuts like `color` and expands them, e.g. `strokeColor` and `fillColor`. Writes the expanded attributes back to the given `attributes`.

Parameters:
{Object} attributes
  object

Returns:
  {Object} The given attributes object with shortcuts expanded.

setArrow(firstArrow, lastArrow)
Determines whether the element has arrows at start or end of the arc. If it is set to be a "typical" vector, ie lastArrow == true, then the element.type is set to VECTOR.

Parameters:
{Boolean} firstArrow
  True if there is an arrow at the start of the arc, false otherwise.
{Boolean} lastArrow
  True if there is an arrow at the end of the arc, false otherwise.

{JXG.GeometryElement} setAttribute(attributes)
Sets an arbitrary number of attributes. This method has one or more parameters of the following types:

- object: {key1:value1,key2:value2,...}
- string: 'key:value'
- array: ['key', value]

Parameters:
{Object} attributes
  An object with attributes.

Returns:
  {JXG.GeometryElement} A reference to the element.

Examples:

    // Set attribute 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
    });

<private> setDash(dash)
Set the dash style of an object. See JXG.GeometryElement#dash for a list of available dash styles. You should use JXG.GeometryElement#setAttribute instead of this method.

Parameters:
{number} dash
  Indicates the new dash style

<private> {JXG.GeometryElement} setDisplayRendNode(val)
Show the element or hide it. If hidden, it will still exist but not be visible on the board.

Sets also the display of the inherits elements. These can be JSXGraph elements or arrays of JSXGraph elements. However, deeper nesting than this is not supported.

Parameters:
{Boolean} val
  true: show the element, false: hide the element

Returns:
  {JXG.GeometryElement} Reference to the element

setLabel(str)
Sets a label and its text If label doesn't exist, it creates one

Parameters:
{String} str

setLabelText(str)
Updates the element's label text, strips all html.

Parameters:
{String} str

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

Parameters:
{String} str

{JXG.Object} setParents(parents)
Sets ids of elements to the array this.parents. First, this.parents is cleared. See JXG.GeometryElement#addParents.

Parameters:
{Array} parents
  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.

{JXG.GeometryElement} setPosition(method, coords)
Translates the object by `(x, y)`. In case the element is defined by points, the defining points are translated, e.g. a circle constructed by a center point and a point on the circle line.

Parameters:
{Number} method
  The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
{Array} coords
  array of translation vector.

Returns:
  {JXG.GeometryElement} Reference to the element object.

{JXG.GeometryElement} setPositionDirectly(method, coords, oldcoords)
Moves an element by the difference of two coordinates.

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

Returns:
  {JXG.GeometryElement} this element

setProperty()
Deprecated alias for JXG.GeometryElement#setAttribute.

Deprecated:
Use JXG.GeometryElement#setAttribute.

{JXG.GeometryElement} show()
Make the element visible. Alias for "element.setAttribute({visible: true});"

Returns:
  {JXG.GeometryElement} Reference to the element

{JXG.GeometryElement} showElement()
Make the element visible. Alias for JXG.GeometryElement#show

Returns:
  {JXG.GeometryElement} Reference to the element

<private> {JXG.GeometryElement} snapToPoints()
Snaps the element to points. Only works for points. Points will snap to the next point as defined in their properties JXG.Point#attractorDistance and JXG.Point#attractorUnit. Lines and circles will snap their parent points to points.

Returns:
  {JXG.GeometryElement} Reference to the element.

{JXG.GeometryElement} update()
General update method. Should be overwritten by the element itself. Can be used sometimes to commit changes to the object.

Returns:
  {JXG.GeometryElement} Reference to the element

<private> {JXG.GeometryElement} updateRenderer()
Provide updateRenderer method.

Returns:
  {JXG.GeometryElement} Reference to the element

<private> {JXG.GeometryElement} updateVisibility(parent_val)
Set the visibility of an element. The visibility is influenced by (listed in ascending priority):

1. The value of the element's attribute 'visible'
2. The visibility of a parent element. (Example: label) This overrules the value of the element's attribute value only if this attribute value of the element is 'inherit'.
3. being inside of the canvas

This method is called three times for most elements:

1. between JXG.GeometryElement#update and JXG.GeometryElement#updateRenderer. In case the value is 'inherit', nothing is done.
2. Recursively, called by itself for child elements. Here, 'inherit' is overruled by the parent's value.
3. In JXG.GeometryElement#updateRenderer, if the element is outside of the canvas.

Parameters:
{Boolean} parent_val
  Visibility of the parent element.

Returns:
  {JXG.GeometryElement} Reference to the element.

{Boolean} useLocale()
Checks if locale is enabled in the attribute. This may be in the attributes of the board, or in the attributes of the text. The latter has higher priority. The board attribute is taken if attribute "intl.enabled" of the text element is set to 'inherit'.

Returns:
  {Boolean} if locale can be used for number formatting.

Event Detail
attribute(o, el)
Notify every time an attribute is changed.

Parameters:
{Object} o
  A list of changed attributes and their new value.
{Object} el
  Reference to the element

attribute:key(val, nval, el)
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`.

Parameters:
val
  The old value.
nval
  The new value
{Object} el
  Reference to the element

down(e)
Whenever the user starts to touch or click an element.

Parameters:
{Event} e
  The browser's event object.

drag(e)
This event is fired whenever the user drags an element.

Parameters:
{Event} e
  The browser's event object.

keydrag(e)
This event is fired whenever the user drags the element by pressing arrow keys on the keyboard.

Parameters:
{Event} e
  The browser's event object.

mousedown(e)
Whenever the user starts to click an element.

Parameters:
{Event} e
  The browser's event object.

mousedrag(e)
This event is fired whenever the user drags the element with a mouse.

Parameters:
{Event} e
  The browser's event object.

mousemove(e)
This event is fired whenever the user is moving the mouse over an element.

Parameters:
{Event} e
  The browser's event object.

mouseout(e)
This event is fired whenever the user puts the mouse away from an element.

Parameters:
{Event} e
  The browser's event object.

mouseover(e)
This event is fired whenever the user puts the mouse over an element.

Parameters:
{Event} e
  The browser's event object.

mouseup(e)
Whenever the user releases the mousebutton over an element.

Parameters:
{Event} e
  The browser's event object.

move(e)
This event is fired whenever the user is moving over an element.

Parameters:
{Event} e
  The browser's event object.

out(e)
This event is fired whenever the user is leaving an element.

Parameters:
{Event} e
  The browser's event object.

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

Parameters:
{Event} e
  The browser's event object.

pendown(e)
Whenever the user taps an element with the pen.

Parameters:
{Event} e
  The browser's event object.

pendrag(e)
This event is fired whenever the user drags the element with a pen.

Parameters:
{Event} e
  The browser's event object.

penup(e)
Whenever the user lifts the pen over an element.

Parameters:
{Event} e
  The browser's event object.

touchdown(e)
Whenever the user starts to touch an element.

Parameters:
{Event} e
  The browser's event object.

touchdrag(e)
This event is fired whenever the user drags the element on a touch device.

Parameters:
{Event} e
  The browser's event object.

touchup(e)
Whenever the user stops touching an element.

Parameters:
{Event} e
  The browser's event object.

up(e)
Whenever the user stops to touch or click an element.

Parameters:
{Event} e
  The browser's event object.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Feb 14 2024 15:53:28 GMT+0100 (heure normale d’Europe centrale)