# JSXGraph 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

- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- Circumcirclesector
- Conic
- Curve
- Ellipse
- Functiongraph
- Glider
- Grid
- Hyperbola
- Image
- Incenter
- Incircle
- Integral
- Intersection
- Line
- Locus
- Midpoint
- Mirrorpoint
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelpoint
- Perpendicular
- Perpendicularpoint
- Point
- Polygon
- Reflection
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Tangent
- Text
- Ticks
- Tracecurve

## Classes

- _global_
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.C
- JXG.CanvasRenderer
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.Curve
- JXG.Dump
- JXG.GeometryElement
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Line
- JXG.Math
- JXG.Math.Geometry
- JXG.Math.Numerics
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.Point
- JXG.Polygon
- JXG.Server
- JXG.Server.modules
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Turtle
- JXG.Util
- JXG.VMLRenderer

# Class JXG.Composition

↳ JXG.Composition

JXG.Composition
Defined in: Composition.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| JXG.Composition(elements) A composition is a simple container that manages none or more JXG.GeometryElements.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| add(what, element) Adds an element to the composition container.
| highlight() Invokes highlight for every stored element with a highlight method and hands over the given arguments.
| noHighlight() Invokes noHighlight for every stored element with a noHighlight method and hands over the given arguments.
| prepareUpdate() Invokes prepareUpdate for every stored element with a prepareUpdate method and hands over the given arguments.
| remove(what) Remove an element from the composition container.
| setProperty() Invokes setProperty for every stored element with a setProperty method and hands over the given arguments.
| update() Invokes update for every stored element with a update method and hands over the given arguments.
| updateRenderer() Invokes updateRenderer for every stored element with a updateRenderer method and hands over the given arguments.

Class Detail
JXG.Composition(elements)
A composition is a simple container that manages none or more JXG.GeometryElements.

Parameters:
{Object} elements
  A list of elements with a descriptive name for the element as the key and a reference to the element as the value of every list entry. The name is used to access the element later on.

Examples:

    var p1 = board.create('point', [1, 2]),
        p2 = board.create('point', [2, 3]),
        c = new JXG.Composition({
            start: p1,
            end: p2
        });

    // moves p1 to [3, 3]
    c.start.moveTo([3, 3]);

Method Detail
{Boolean} add(what, element)
Adds an element to the composition container.

Parameters:
{String} what
  Descriptive name for the element, e.g. startpoint or area. This is used to access the element later on. There are some reserved names: elements, add, remove, update, prepareUpdate, updateRenderer, highlight, noHighlight, and all names that would form invalid object property names in JavaScript.
{JXG.GeometryElement|JXG.Composition} element
  A reference to the element that is to be added. This can be another composition, too.

Returns:
  {Boolean} True, if the element was added successfully. Reasons why adding the element failed include using a reserved name and providing an invalid element.

highlight()
Invokes highlight for every stored element with a highlight method and hands over the given arguments. See JXG.GeometryElement#highlight for further description, valid parameters and return values.

noHighlight()
Invokes noHighlight for every stored element with a noHighlight method and hands over the given arguments. See JXG.GeometryElement#noHighlight for further description, valid parameters and return values.

prepareUpdate()
Invokes prepareUpdate for every stored element with a prepareUpdate method and hands over the given arguments. See JXG.GeometryElement#prepareUpdate for further description, valid parameters and return values.

{Boolean} remove(what)
Remove an element from the composition container.

Parameters:
{String} what
  The name used to access the element.

Returns:
  {Boolean} True, if the element has been removed successfully.

setProperty()
Invokes setProperty for every stored element with a setProperty method and hands over the given arguments. See JXG.GeometryElement#setProperty for further description, valid parameters and return values.

update()
Invokes update for every stored element with a update method and hands over the given arguments. See JXG.GeometryElement#update for further description, valid parameters and return values.

updateRenderer()
Invokes updateRenderer for every stored element with a updateRenderer method and hands over the given arguments. See JXG.GeometryElement#updateRenderer for further description, valid parameters and return values.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Apr 02 2012 17:54:06 GMT+0200 (MESZ)