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

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.
 
Invokes fullUpdate for every stored element with a fullUpdate method and hands over the given arguments.
 
Invokes highlight for every stored element with a highlight method and hands over the given arguments.
 
Invokes noHighlight for every stored element with a noHighlight method and hands over the given arguments.
 
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.
 
Invokes setAttribute for every stored element with a setAttribute method and hands over the given arguments.
 
Invokes setParents for every stored element with a setParents method and hands over the given arguments.
 
Invokes update for every stored element with a update method and hands over the given arguments.
 
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.

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

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.

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

setParents()
Invokes setParents for every stored element with a setParents method and hands over the given arguments. See JXG.GeometryElement#setParents 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 Fri Nov 08 2024 12:13:04 GMT+0100 (Mitteleuropäische Normalzeit)