Attributes
Own
none
Inherited
Members
Own
none
Inherited
Methods
Own
face(f)
Set the face of a point element.
Parameters
| Name | Type | Description |
|---|---|---|
f |
String | String which determines the face of the point. See JXG.GeometryElement#face for a list of available faces. |
Details
- Deprecated
- Use setAttribute()
- See
-
- JXG.GeometryElement#face
- Source
- base/point.js, line 295
(private) hasPoint(x, y) → {Boolean}
Checks whether (x,y) is near the point.
Parameters
| Name | Type | Description |
|---|---|---|
x |
Number | Coordinate in x direction, screen coordinates. |
y |
Number | Coordinate in y direction, screen coordinates. |
Returns
True if (x,y) is near the point, False otherwise.
- Type
- Boolean
Details
- Overrides
- JXG.CoordsElement#hasPoint
- Source
- base/point.js, line 96
isOn(el, tol) → {Boolean}
Test if the point is on (is incident with) element "el".
Example
var circ = board.create('circle', [[-2, -2], 1]);
var seg = board.create('segment', [[-1, -3], [0,0]]);
var line = board.create('line', [[1, 3], [2, -2]]);
var po = board.create('point', [-1, 0], {color: 'blue'});
var curve = board.create('functiongraph', ['sin(x)'], {strokeColor: 'blue'});
var pol = board.create('polygon', [[2,2], [4,2], [4,3]], {strokeColor: 'blue'});
var point = board.create('point', [-1, 1], {
attractors: [line, seg, circ, po, curve, pol],
attractorDistance: 0.2
});
var txt = board.create('text', [-4, 3, function() {
return 'point on line: ' + point.isOn(line) + '
' +
'point on seg: ' + point.isOn(seg) + '
' +
'point on circ = ' + point.isOn(circ) + '
' +
'point on point = ' + point.isOn(po) + '
' +
'point on curve = ' + point.isOn(curve) + '
' +
'point on polygon = ' + point.isOn(pol) + '
';
}]);
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | |
tol |
Number |
Returns
- Type
- Boolean
Details
- Source
- base/point.js, line 371
makeIntersection(el1,)
Convert the point to intersection point and update the construction. To move the point visual onto the intersection, a call of board update is necessary.
Parameters
| Name | Type | Description |
|---|---|---|
el1, |
String | Object | el2, i, j The intersecting objects and the numbers. |
Details
- Source
- base/point.js, line 191
normalizeFace(s) → {*}
Parameters
| Name | Type | Description |
|---|---|---|
s |
Returns
- Type
- *
Details
- Deprecated
- Use JXG#normalizePointFace instead
- Source
- base/point.js, line 284
(private) setStyle(i)
Set the style of a point. Used for GEONExT import and should not be used to set the point's face and size.
Parameters
| Name | Type | Description |
|---|---|---|
i |
Number | Integer to determine the style. |
Details
- Source
- base/point.js, line 241
size(s)
Set the size of a point element
Parameters
| Name | Type | Description |
|---|---|---|
s |
Number | Integer which determines the size of the point. |
Details
- Deprecated
- Use setAttribute()
- See
-
- JXG.GeometryElement#size
- Source
- base/point.js, line 306
update()
Updates the position of the point.
Details
- Overrides
- JXG.CoordsElement#update
- Source
- base/point.js, line 126
(private) updateRenderer()
Calls the renderer to update the drawing.
Details
- Overrides
- JXG.CoordsElement#updateRenderer
- Source
- base/point.js, line 175
updateTransform(fromParent) → {JXG.CoordsElement}
Applies the transformations of the element to JXG.GeometryElement#baseElement. Point transformations are relative to a base element.
Parameters
| Name | Type | Description |
|---|---|---|
fromParent |
Boolean | True if the drag comes from a child element. This is the case if a line through two points is dragged. Otherwise, the element is the drag element and we apply the the inverse transformation to the baseElement if is different from the element. |
Returns
Reference to this object.
- Type
- JXG.CoordsElement
Details
- Overrides
- JXG.CoordsElement#updateTransform
- Source
- base/point.js, line 148
Inherited
Events
Own
none
Inherited
Parameters
| Name | Type | Description |
|---|---|---|
board |
string | JXG.Board | The board the new point is drawn on. |
coordinates |
Array | An array with the user coordinates of the point. |
attributes |
Object | An object containing attributes like in JXG.Options#point and JXG.Options#elements, and optional a name and an id. |
Details
- See
- Source
- base/point.js, line 64