Attributes
Own
none
Inherited
Members
Own
content : string
- Description
'href' of the foreignObject.
- Type
- string
- Source
- base/foreignobject.js, line 94
size : Array
- Description
Array of length two containing [width, height] of the foreignObject in pixel.
- Type
- Array
- Source
- base/foreignobject.js, line 77
Inherited
Methods
Own
H() → {number}
Returns the height of the foreignObject in user coordinates.
Returns
height of the image in user coordinates
- Type
- number
Details
- Source
- base/foreignobject.js, line 343
W() → {number}
Returns the width of the foreignObject in user coordinates.
Returns
width of the image in user coordinates
- Type
- number
Details
- Source
- base/foreignobject.js, line 337
hasPoint(x, y) → {Boolean}
Checks whether (x,y) is over or near the image;
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 over the image, False otherwise.
- Type
- Boolean
Details
- Overrides
- JXG.CoordsElement#hasPoint
- Source
- base/foreignobject.js, line 134
setSize(width, height) → {JXG.ForeignObject}
Set the width and height of the foreignObject. After setting a new size, board.update() or foreignobject.fullUpdate() has to be called to make the change visible.
Parameters
| Name | Type | Description |
|---|---|---|
width |
numbe | function | string | Number, function or string that determines the new width of the foreignObject |
height |
number | function | string | Number, function or string that determines the new height of the foreignObject |
Returns
A reference to the element
- Type
- JXG.ForeignObject
Details
- Source
- base/foreignobject.js, line 324
(private) update() → {JXG.ForeignObject}
Recalculate the coordinates of lower left corner and the width and height.
Returns
A reference to the element
- Type
- JXG.ForeignObject
Details
- Overrides
- JXG.CoordsElement#update
- Source
- base/foreignobject.js, line 180
(private) updateRenderer()
Send an update request to the renderer.
Details
- Overrides
- JXG.CoordsElement#updateRenderer
- Source
- base/foreignobject.js, line 194
(private) updateSize() → {JXG.ForeignObject}
Updates the internal arrays containing size of the foreignObject.
Returns
A reference to the element
- Type
- JXG.ForeignObject
Details
- Source
- base/foreignobject.js, line 203
(private) updateSpan() → {JXG.ForeignObject}
Update the anchor point of the foreignObject, i.e. the lower left corner and the two vectors which span the rectangle.
Returns
A reference to the element
- Type
- JXG.ForeignObject
Details
- Source
- base/foreignobject.js, line 229
Inherited
Events
Own
none
Inherited
Parameters
| Name | Type | Description |
|---|---|---|
board |
string | JXG.Board | The board the new foreignObject is drawn on. |
coordinates |
Array | An array with the user coordinates of the foreignObject. |
attributes |
Object | An object containing visual and - optionally - a name and an id. |
url |
string | function | An URL string or a function returning an URL string. |
size |
Array | Array containing width and height of the foreignObject in user coordinates. |
Details
- Source
- base/foreignobject.js, line 61