# JSXGraph 1.11.1 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
- Axes3D
- Axis
- Axis3D
- Bisector
- Bisectorlines
- Boxplot
- Button
- Cardinalspline
- Chart
- Checkbox
- Circle
- Circle3D
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Comb
- Conic
- Curve
- Curve3D
- CurveDifference
- CurveIntersection
- CurveUnion
- Derivative
- Ellipse
- Face3D
- ForeignObject
- Functiongraph
- Functiongraph3D
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- ImplicitCurve
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- IntersectionCircle3D
- IntersectionLine3D
- Label
- Legend
- Line
- Line3D
- MajorArc
- MajorSector
- Measurement
- Mesh3D
- Metapostspline
- Midpoint
- MinorArc
- MinorSector
- MirrorElement
- MirrorPoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelogram
- Parallelpoint
- ParametricSurface3D
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Plane3D
- Point
- Point3D
- PolarLine
- PolePoint
- Polygon
- Polygon3D
- PolygonalChain
- Polyhedron3D
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopefield
- Slopetriangle
- Smartlabel
- Sphere3D
- Spline
- Stepfunction
- Tangent
- TangentTo
- Tapemeasure
- Text
- Text3D
- Ticks
- Ticks3D
- Tracecurve
- Transformation
- Transformation3D
- Turtle
- Vectorfield
- Vectorfield3D
- View3D

Classes

- _global_
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.Board.infobox
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Chart
- JXG.Circle
- JXG.Circle3D
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Curve3D
- JXG.Dump
- JXG.EventEmitter
- JXG.Expect
- JXG.Face3D
- 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.NoRenderer
- JXG.Options
- JXG.Plane3D
- JXG.Point
- JXG.Point3D
- JXG.Polygon
- JXG.Polygon3D
- JXG.PrefixParser
- JXG.Sphere3D
- JXG.Surface3D
- JXG.SVGRenderer
- JXG.Text
- JXG.Text3D
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.View3D
- JXG.VMLRenderer
- JXG.XML

# Class JXG.Group

↳ JXG.Group

In this class all group management is done.
Defined in: group.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| JXG.Group(board, id, name, objects, attributes) Creates a new instance of Group.

Field Summary
Field Attributes | Field Name and Description
--- | ---
<private> | coords Cache coordinates of points.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | _addActionPoint(action, point) Generic method for JXG.Group@addTranslationPoint and JXG.Group@addRotationPoint
<private> | _removeActionPoint(action, point) Generic method for JXG.Group@removeTranslationPoint and JXG.Group@removeRotationPoint
<private> | _setActionPoints(action, objects) Generic method for JXG.Group@setTranslationPoints and JXG.Group@setRotationPoints
<private> | _update_apply_transformation(drag, t)
<private> | _update_centroid_center() Determine the Euclidean (affine) coordinates of the centroid of the group.
<private> | _update_find_drag_type()
<private> | _updateCoordsCache(el) Update the cached coordinates of a group element.
| addGroup(group) Adds all points in a group to this group.
| addParents(parents) Adds ids of elements to the array this.parents.
| addPoint(object) Adds an Point to this group.
| addPoints(objects) Adds multiple points to this group.
| addRotationPoint(point) Adds a point to the set of rotation points of the group.
| addScalePoint(point, direction) Adds a point to the set of the scale points of the group.
| addTranslationPoint(point) Adds a point to the set of the translation points of the group.
| getParents() List of the element ids resp.
| removePoint(point) Removes a point from the group.
| removeRotationPoint(point) Removes the rotation property from a point of the group.
| removeScalePoint(point) Removes the scaling property from a point of the group.
| removeTranslationPoint(point) Removes the translation property from a point of the group.
| setParents(parents) Sets ids of elements to the array this.parents.
<deprecated> | setProperty()
| setRotationCenter(object) Sets the center of rotation for the group.
| setRotationPoints(objects) Sets the rotation points of the group.
| setScaleCenter(object) Sets the center of scaling for the group.
| setScalePoints(objects, direction) Sets the scale points of the group.
| setTranslationPoints(objects) Sets the translation points of the group.
| ungroup() Releases all elements of this group.
| update() Sends an update to all group members.

Class Detail
JXG.Group(board, id, name, objects, attributes)
Creates a new instance of Group.

Parameters:
{JXG.Board} board
{String} id
  Unique identifier for this object. If null or an empty string is given, an unique id will be generated by Board
{String} name
  Not necessarily unique name, displayed on the board. If null or an empty string is given, an unique name will be generated.
{Array} objects
  Array of points to add to this group.
{Object} attributes
  Defines the visual appearance of the group.

Field Detail
<private> {Object} coords
Cache coordinates of points. From this and the actual position of the points, the translation is determined. It has to be kept updated in this class "by hand"-

See:
  JXG.Group#_updateCoordsCache

Method Detail
<private> _addActionPoint(action, point)
Generic method for JXG.Group@addTranslationPoint and JXG.Group@addRotationPoint

Parameters:
action
point

<private> _removeActionPoint(action, point)
Generic method for JXG.Group@removeTranslationPoint and JXG.Group@removeRotationPoint

Parameters:
action
point

<private> _setActionPoints(action, objects)
Generic method for JXG.Group@setTranslationPoints and JXG.Group@setRotationPoints

Parameters:
action
objects

<private> _update_apply_transformation(drag, t)

Parameters:
drag
t

<private> {Array} _update_centroid_center()
Determine the Euclidean (affine) coordinates of the centroid of the group.

Returns:
  {Array} array of length two,

<private> _update_find_drag_type()

<private> _updateCoordsCache(el)
Update the cached coordinates of a group element.

Parameters:
{String} el
  element id of the group element whose cached coordinates are going to be updated.

Returns:
  null

{JXG.Group} addGroup(group)
Adds all points in a group to this group.

Parameters:
{JXG.Group} group
  The group added to this group.

Returns:
  {JXG.Group} returns this group

{JXG.Object} addParents(parents)
Adds ids of elements to the array this.parents. This is a copy of Element.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.Group} addPoint(object)
Adds an Point to this group.

Parameters:
{JXG.Point} object
  The point added to the group.

Returns:
  {JXG.Group} returns this group

{JXG.Group} addPoints(objects)
Adds multiple points to this group.

Parameters:
{Array} objects
  An array of points to add to the group.

Returns:
  {JXG.Group} returns this group

{JXG.Group} addRotationPoint(point)
Adds a point to the set of rotation points of the group. Dragging at one of these points results into a rotation of the whole group around the rotation center of the group {@see JXG.Group#setRotationCenter}.

Parameters:
{JXG.Point} point
  JXG.Point element.

Returns:
  {JXG.Group} returns this group

{JXG.Group} addScalePoint(point, direction)
Adds a point to the set of the scale points of the group. Dragging at one of these points results into a scaling of the whole group.

Parameters:
{JXG.Point} point
  JXG.Point element.
{String} direction
  Restricts the directions to be scaled. Possible values are 'x', 'y', 'xy'. Default value is 'xy'.

Returns:
  {JXG.Group} returns this group

{JXG.Group} addTranslationPoint(point)
Adds a point to the set of the translation points of the group. Dragging one of these points results into a translation of the whole group.

Parameters:
{JXG.Point} point
  JXG.Point element.

Returns:
  {JXG.Group} returns this group

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

Returns:
  {Array}

{JXG.Group} removePoint(point)
Removes a point from the group.

Parameters:
{JXG.Point} point

Returns:
  {JXG.Group} returns this group

{JXG.Group} removeRotationPoint(point)
Removes the rotation property from a point of the group.

Parameters:
{JXG.Point} point
  JXG.Point element.

Returns:
  {JXG.Group} returns this group

{JXG.Group} removeScalePoint(point)
Removes the scaling property from a point of the group.

Parameters:
{JXG.Point} point
  JXG.Point element.

Returns:
  {JXG.Group} returns this group

{JXG.Group} removeTranslationPoint(point)
Removes the translation property from a point of the group.

Parameters:
{JXG.Point} point
  JXG.Point element.

Returns:
  {JXG.Group} returns this group

{JXG.Object} setParents(parents)
Sets ids of elements to the array this.parents. This is a copy of Element.setParents First, this.parents is cleared. See Group#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.

setProperty()

Deprecated:
Use setAttribute

{JXG.Group} setRotationCenter(object)
Sets the center of rotation for the group. This is either a point or the centroid of the group.

Parameters:
{JXG.Point|String|Array|Function} object
  A point which will be the center of rotation, the string "centroid", or an array of length two, or a function returning an array of length two.

Returns:
  {JXG.Group} returns this group

{JXG.Group} setRotationPoints(objects)
Sets the rotation points of the group. Dragging at one of these points results into a rotation of the whole group around the rotation center of the group {@see JXG.Group#setRotationCenter}.

Parameters:
{Array|JXG.Point} objects
  Array of JXG.Point or arbitrary number of JXG.Point elements.

Returns:
  {JXG.Group} returns this group

{JXG.Group} setScaleCenter(object)
Sets the center of scaling for the group. This is either a point or the centroid of the group.

Parameters:
{JXG.Point|String} object
  A point which will be the center of scaling, the string "centroid", or an array of length two, or a function returning an array of length two.

Returns:
  {JXG.Group} returns this group

{JXG.Group} setScalePoints(objects, direction)
Sets the scale points of the group. Dragging at one of these points results into a scaling of the whole group.

Parameters:
{Array|JXG.Point} objects
  Array of JXG.Point or arbitrary number of JXG.Point elements.
{String} direction
  Restricts the directions to be scaled. Possible values are 'x', 'y', 'xy'. Default value is 'xy'. By default, all points of the group are translation points.

Returns:
  {JXG.Group} returns this group

{JXG.Group} setTranslationPoints(objects)
Sets the translation points of the group. Dragging at one of these points results into a translation of the whole group.

Parameters:
{Array|JXG.Point} objects
  Array of JXG.Point or arbitrary number of JXG.Point elements. By default, all points of the group are translation points.

Returns:
  {JXG.Group} returns this group

{JXG.Group} ungroup()
Releases all elements of this group.

Returns:
  {JXG.Group} returns this (empty) group

{JXG.Group} update()
Sends an update to all group members. This method is called from the points' coords object event listeners and not by the board.

Returns:
  {JXG.Group} returns this group

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Apr 04 2025 09:22:41 GMT+0200 (Mitteleuropäische Sommerzeit)