Members
Own
(private) coords : Object
- Description
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"-
- Type
- Object
- See
- Source
- base/group.js, line 92
Inherited
none
Methods
Own
(private) _addActionPoint()
Generic method for JXG.Group#addTranslationPoint and JXG.Group#addRotationPoint
Details
- Source
- base/group.js, line 727
(private) _removeActionPoint()
Generic method for JXG.Group#removeTranslationPoint and JXG.Group#removeRotationPoint
Details
- Source
- base/group.js, line 737
(private) _setActionPoints()
Generic method for JXG.Group#setTranslationPoints and JXG.Group#setRotationPoints
Details
- Source
- base/group.js, line 706
_updateCoordsCache(el)
Update the cached coordinates of a group element.
Parameters
| Name | Type | Description |
|---|---|---|
el |
String | element id of the group element whose cached coordinates are going to be updated. |
Returns
null
Details
- Source
- base/group.js, line 212
(private) _update_centroid_center() → {Array}
Determine the Euclidean (affine) coordinates of the centroid of the group.
Returns
array of length two,
- Type
- Array
Details
- Source
- base/group.js, line 443
addGroup(group) → {Group}
Adds all points in a group to this group.
Parameters
| Name | Type | Description |
|---|---|---|
group |
Group | The group added to this group. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 549
addParents(parents) → {JXG.Object}
Adds ids of elements to the array this.parents. This is a copy of Element.addParents.
Parameters
| Name | Type | Description |
|---|---|---|
parents |
Array | Array of elements or ids of elements. Alternatively, one can give a list of objects as parameters. |
Returns
reference to the object itself.
- Type
- JXG.Object
Details
- Source
- base/group.js, line 163
addPoint(object) → {Group}
Adds an Point to this group.
Parameters
| Name | Type | Description |
|---|---|---|
object |
Point | The point added to the group. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 518
addPoints(objects) → {Group}
Adds multiple points to this group.
Parameters
| Name | Type | Description |
|---|---|---|
objects |
Array | An array of points to add to the group. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 534
addRotationPoint(point) → {Group}
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 Group#setRotationCenter.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 601
addScalePoint(point, direction) → {Group}
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
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
direction |
String | Restricts the directions to be scaled. Possible values are 'x', 'y', 'xy'. Default value is 'xy'. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 686
addTranslationPoint(point) → {Group}
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
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 631
getParents() → {Array}
List of the element ids resp. values used as parents in JXG.Board#create.
Returns
- Type
- Array
Details
- Source
- base/group.js, line 202
removePoint(point) → {Group}
Removes a point from the group.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Point |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 566
removeRotationPoint(point) → {Group}
Removes the rotation property from a point of the group.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 610
removeScalePoint(point) → {Group}
Removes the scaling property from a point of the group.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 698
removeTranslationPoint(point) → {Group}
Removes the translation property from a point of the group.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Point | Point element. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 640
setParents(parents) → {JXG.Object}
Sets ids of elements to the array this.parents. This is a copy of Element.setParents First, this.parents is cleared. See JXG.Group#addParents.
Parameters
| Name | Type | Description |
|---|---|---|
parents |
Array | Array of elements or ids of elements. Alternatively, one can give a list of objects as parameters. |
Returns
reference to the object itself.
- Type
- JXG.Object
Details
- Source
- base/group.js, line 192
setRotationCenter(object) → {Group}
Sets the center of rotation for the group. This is either a point or the centroid of the group.
Parameters
| Name | Type | Description |
|---|---|---|
object |
Point | String | Array | function | 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
returns this group
- Type
- Group
Details
- Default Value
- 'centroid'
- Source
- base/group.js, line 579
setRotationPoints(objects) → {Group}
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 Group#setRotationCenter.
Parameters
| Name | Type | Description |
|---|---|---|
objects |
Array | Point |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 591
setScaleCenter(object) → {Group}
Sets the center of scaling for the group. This is either a point or the centroid of the group.
Parameters
| Name | Type | Description |
|---|---|---|
object |
Point | String | 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
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 650
setScalePoints(objects, direction) → {Group}
Sets the scale points of the group. Dragging at one of these points results into a scaling of the whole group.
Parameters
| Name | Type | Description |
|---|---|---|
objects |
Array | Point | |
direction |
String | 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
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 664
setTranslationPoints(objects) → {Group}
Sets the translation points of the group. Dragging at one of these points results into a translation of the whole group.
Parameters
| Name | Type | Description |
|---|---|---|
objects |
Array | Point | Array of Point or arbitrary number of Point elements. By default, all points of the group are translation points. |
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 621
ungroup() → {Group}
Releases all elements of this group.
Returns
returns this (empty) group
- Type
- Group
Details
- Source
- base/group.js, line 138
update() → {Group}
Sends an update to all group members. This method is called from the points' coords object event listeners and not by the board.
Returns
returns this group
- Type
- Group
Details
- Source
- base/group.js, line 226
Inherited
none
Parameters
| Name | Type | Description |
|---|---|---|
board |
JXG.Board | |
id |
String | Unique identifier for this object. If null or an empty string is given, an unique id will be generated by Board |
name |
String | Not necessarily unique name, displayed on the board. If null or an empty string is given, an unique name will be generated. |
objects |
Array | Array of points to add to this group. |
attributes |
Object | Defines the visual appearance of the group. |
Details
- Source
- base/group.js, line 58