Members
Own
container : Node
- Description
The HTML element that stores the JSXGraph board in it.
- Type
- Node
- Source
- renderer/abstract.js, line 139
dashArray : Array
- Description
Defines dash patterns. Sizes are in pixel. Defined styles are:
1: 2 dash, 2 space2: 5 dash, 5 space3: 10 dash, 10 space4: 20 dash, 20 space5: 20 dash, 10 space, 10 dash, 10 space6: 20 dash, 5 space, 10 dash, 5 space7: 0 dash, 5 space (dotted line)
This means, the numbering is 1-based. Solid lines are set with dash:0. If the object's attribute "dashScale:true" the dash pattern is multiplied by strokeWidth / 2.
- Type
- Array
- Default Value
- [[2, 2], [5, 5], [10, 10], [20, 20], [20, 10, 10, 10], [20, 5, 10, 5], [0, 5]]
- See
- Source
- renderer/abstract.js, line 182
enhancedRendering : Boolean
- Description
If this property is set to
truethe visual properties (attributes) of the elements are updated on every update. Visual properties means: All the stuff stored in the JXG.GeometryElement#visProp property won't be set if enhancedRendering isfalse- Type
- Boolean
- Default Value
- true
- Source
- renderer/abstract.js, line 133
(private) supportsForeignObject : Boolean
- Description
True if the browsers' SVG engine supports foreignObject. Not supported browsers are IE 9 - 11. It is tested in svg renderer.
- Type
- Boolean
- Source
- renderer/abstract.js, line 158
type : String
- Description
This is used to easily determine which renderer we are using
- Type
- String
- Example
-
if (board.renderer.type === 'vml') { // do something } - Source
- renderer/abstract.js, line 148
vOffsetText : Number
- Description
The vertical offset for Text elements. Every Text element will be placed this amount of pixels below the user given coordinates.
- Type
- Number
- Default Value
- 0
- Source
- renderer/abstract.js, line 124
Inherited
none
Methods
Own
(private) _getHighlighted(el) → {String}
Get information if element is highlighted.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | The element which is tested for being highlighted. |
Returns
'highlight' if highlighted, otherwise the ampty string '' is returned.
- Type
- String
Details
- Source
- renderer/abstract.js, line 290
_setArrowWidth(node, width, parentNode)
Updates width of an arrow DOM node. Used in
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The arrow node. |
width |
Number | |
parentNode |
Node | Used in IE only |
Details
- Source
- renderer/abstract.js, line 1683
(private) _updateVisual(el, notopt, enhancedopt)
Update visual properties, but only if JXG.AbstractRenderer#enhancedRendering or enhanced is set to true.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
el |
JXG.GeometryElement | The element to update |
||
not |
Object |
<optional> |
{}
|
Select properties you don't want to be updated: |
enhanced |
Boolean |
<optional> |
false
|
If true, JXG.AbstractRenderer#enhancedRendering is assumed to be true. |
Details
- Source
- renderer/abstract.js, line 207
appendChildPrim(node, level)
Appends a node to a specific layer level. This is just an abstract method and has to be implemented
in all renderers that want to use the createPrim model to draw.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | A DOM tree node. |
level |
Number | The layer the node is attached to. This is the index of the layer in
JXG.SVGRenderer#layer or the |
Details
- Source
- renderer/abstract.js, line 1644
appendNodesToElement(el, type)
Stores the rendering nodes. This is an abstract method which has to be implemented in all renderers that use
the createPrim method.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | A JSXGraph element. |
type |
String | The XML node name. Only used in VMLRenderer. |
Details
- Source
- renderer/abstract.js, line 1652
changePointStyle(el)
Changes the style of a Point. This is required because the point styles differ in what elements have to be drawn, e.g. if the point is marked by a "x" or a "+" two lines are drawn, if it's marked by spot a circle is drawn. This method removes the old renderer element(s) and creates the new one(s).
Parameters
| Name | Type | Description |
|---|---|---|
el |
Point | Reference to a Point object, that's style is changed. |
Details
createPrim(type, id) → {Node}
Creates a node of a given type with a given id.
Parameters
| Name | Type | Description |
|---|---|---|
type |
String | The type of the node to create. |
id |
String | Set the id attribute to this. |
Returns
Reference to the created node.
- Type
- Node
Details
- Source
- renderer/abstract.js, line 1660
createTouchpoints(n)
Create crosshair elements (Fadenkreuz) for presentations.
Parameters
| Name | Type | Description |
|---|---|---|
n |
Number | Number of crosshairs. |
Details
- Source
- renderer/abstract.js, line 2308
display(el, value)
Shows or hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to the object that has to appear. |
value |
Boolean | true to show the element, false to hide the element. |
Details
- Source
- renderer/abstract.js, line 1772
displayCopyright(str, fontsize)
Shows a small copyright notice in the top left corner of the board.
Parameters
| Name | Type | Description |
|---|---|---|
str |
String | The copyright notice itself |
fontsize |
Number | Size of the font the copyright notice is written in |
Details
displayLogo(str, fontsize)
Shows a small JSXGraph logo in the top left corner of the board.
Parameters
| Name | Type | Description |
|---|---|---|
str |
String | The data-URL of the logo |
fontsize |
Number | Size of the font the copyright notice is written in |
Details
drawCurve(el)
Draws a JXG.Curve on the JXG.Board.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.Curve | Reference to a graph object, that has to be plotted. |
Details
drawEllipse(el)
Draws a Circle
Parameters
| Name | Type | Description |
|---|---|---|
el |
Circle | Reference to a Circle object that has to be drawn. |
Details
drawImage(el)
Generates an Image on a board; This is just a template that has to be implemented by special renderers.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Image | Reference to the image object that is to be drawn |
Details
drawInternalText(el)
An internal text is a Text element which is drawn using only the given renderer but no HTML. This method is only a stub, the drawing is done in the special renderers.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to a JXG.Text object |
Details
drawLine(el)
Draws a line on the JXG.Board.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Line | Reference to a line object, that has to be drawn. |
Details
(private) drawNavigationBar(board, attr)
The tiny zoom bar shown on the bottom of a board (if board attribute "showNavigation" is true). It is a div element and gets the CSS class "JXG_navigation" and the id {board id}_navigationbar.
The buttons get the CSS class "JXG_navigation_button" and the id {board_id}_name where name is one of [top, down, left, right, out, 100, in, fullscreen, screenshot, reload, cleartraces].
The symbols for zoom, navigation and reload are hard-coded.
Parameters
| Name | Type | Description |
|---|---|---|
board |
JXG.Board | Reference to a JSXGraph board. |
attr |
Object | Attributes of the navigation bar |
Details
- Source
- renderer/abstract.js, line 2110
drawPoint(el)
Draws a point on the JXG.Board.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Point | Reference to a Point object that has to be drawn. |
Details
drawPolygon(el)
Draws a JXG.Polygon on the JXG.Board.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Polygon | Reference to a Polygon object, that is to be drawn. |
Details
drawText(el)
Displays a JXG.Text on the JXG.Board by putting a HTML div over it.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to an JXG.Text object, that has to be displayed |
Details
drawTicks(el)
Creates a rendering node for ticks added to a line.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Line | A arbitrary line. |
Details
dumpToCanvas()
Convert SVG construction to canvas. Only available on SVGRenderer.
Details
dumpToDataURI()
Convert SVG construction to base64 encoded SVG data URL. Only available on SVGRenderer.
Details
(private) getArrowHeadData(el, strokewidth, hl) → {Object}
This method determines some data about the line endings of this element. If there are arrow heads, the offset is determined so that no parts of the line stroke lap over the arrow head.
The returned object also contains the types of the arrow heads.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | JSXGraph line or curve element |
strokewidth |
Number | strokewidth of the element |
hl |
String | Ither 'highlight' or empty string |
Returns
object containing the data
- Type
- Object
Details
- Source
- renderer/abstract.js, line 560
getElementById(id) → {Object}
Wrapper for getElementById for maybe other renderers which elements are not directly accessible by DOM methods like document.getElementById().
Parameters
| Name | Type | Description |
|---|---|---|
id |
String | Unique identifier for element. |
Returns
Reference to a JavaScript object. In case of SVG/VMLRenderer it's a reference to a SVG/VML node.
- Type
- Object
Details
- Source
- renderer/abstract.js, line 2257
getPositionArrowHead(el, c1, c2, a)
Shorten the length of a line element such that the arrow head touches the start or end point and such that the arrow head ends exactly at the start / end position of the line.
The Coords objects c1 and c2 are changed in place. In object a, the Boolean properties 'showFirst' and 'showLast' are set.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Line | Reference to the line object that gets arrow heads. |
c1 |
JXG.Coords | Coords of the first point of the line (after JXG.Math.Geometry#calcStraight). |
c2 |
JXG.Coords | Coords of the second point of the line (after JXG.Math.Geometry#calcStraight). |
a |
Object | Object { evFirst: Boolean, evLast: Boolean} containing information about arrow heads. |
Details
handleTouchpoints(el, c1, c2, a)
Handle touchlastpoint / touchfirstpoint
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | |
c1 |
JXG.Coords | Coordinates of the start of the line. The coordinates are changed in place. |
c2 |
JXG.Coords | Coordinates of the end of the line. The coordinates are changed in place. |
a |
Object |
Details
hide(el)
Hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
Please use JXG.AbstractRenderer#display instead
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to the geometry element that has to disappear. |
Details
- Deprecated
- Yes
- See
- Source
- renderer/abstract.js, line 1786
hideTouchpoint(i)
Hide a specific crosshair.
Parameters
| Name | Type | Description |
|---|---|---|
i |
Number | Number of the crosshair to show |
Details
- Source
- renderer/abstract.js, line 2320
highlight(el, suppressHighlightStrokeWidthopt) → {JXG.AbstractRenderer}
Highlights an object, i.e. changes the current colors of the object to its highlighting colors and highlighting strokewidth.
Parameters
| Name | Type | Attributes | Description |
|---|---|---|---|
el |
JXG.GeometryElement | Reference of the object that will be highlighted. |
|
suppressHighlightStrokeWidth |
Boolean |
<optional> |
If undefined or false, highlighting also changes strokeWidth. This might not be the cases for polygon borders. Thus, if a polygon is highlighted, its polygon borders change strokeWidth only if the polygon attribute highlightByStrokeWidth == true. |
Returns
Reference to the renderer
- Type
- JXG.AbstractRenderer
Details
joinTransforms(el, transformations) → {Array}
Multiplication of transformations without updating. That means, at that point it is expected that the
matrices contain numbers only. First, the origin in user coords is translated to (0,0) in screen
coords. Then, the stretch factors are divided out. After the transformations in user coords, the stretch
factors are multiplied in again, and the origin in user coords is translated back to its position. This
method does not have to be implemented in a new renderer.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | A JSXGraph element. We only need its board property. |
transformations |
Array | An array of JXG.Transformations. |
Returns
A matrix represented by a two dimensional array of numbers.
- Type
- Array
Details
makeArrows(el, arrowData)
Can be used to create the nodes to display arrows. This is an abstract method which has to be implemented in any descendant renderer.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | The element the arrows are to be attached to. |
arrowData |
Object | Data concerning possible arrow heads |
Details
- Source
- renderer/abstract.js, line 1675
noHighlight(el) → {JXG.AbstractRenderer}
Uses the normal colors of an object, i.e. the opposite of JXG.AbstractRenderer#highlight.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that will get its normal colors. |
Returns
Reference to the renderer
- Type
- JXG.AbstractRenderer
Details
remove(node)
Removes an element node. Just a stub.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The node to remove. |
Details
- Source
- renderer/abstract.js, line 1666
removeDraft(el)
Puts an object from draft mode back into normal mode.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that no longer is in draft mode. |
Details
- Source
- renderer/abstract.js, line 1902
removeToInsertLater(el) → {function}
Remove an element and provide a function that inserts it into its original position. This method is taken from this article https://developers.google.com/speed/articles/javascript-dom.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Element | The element to be temporarily removed |
Returns
A function that inserts the element into its original position
- Type
- function
Details
- Source
- renderer/abstract.js, line 2279
resize(w, h)
Resizes the rendering element
Parameters
| Name | Type | Description |
|---|---|---|
w |
Number | New width |
h |
Number | New height |
Details
- Source
- renderer/abstract.js, line 2302
screenshot()
Display SVG image in html img-tag which enables easy download for the user.
See JXG.SVGRenderer#screenshot
Details
- Source
- renderer/abstract.js, line 2353
setARIA(el)
Set ARIA related properties of an element. The attribute "aria" of an element contains at least the properties "enabled", "label", and "live". Additionally, all available properties from https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA may be set.
In JSXGraph, the available attributes are used without the leading 'aria-'. For example, the value of the JSXGraph attribute 'aria.label' will be set to the HTML attribute 'aria-label'.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that wants new ARIA attributes. |
Details
- Source
- renderer/abstract.js, line 1927
(private) setArrowSize(el, arrowData) → {JXG.AbstractRenderer}
Set the arrow head size.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to a line or curve object that has to be drawn. |
arrowData |
Object | Data concerning possible arrow heads |
Returns
Reference to the renderer
- Type
- JXG.AbstractRenderer
Details
setBuffering(node, type)
Sets the buffering as recommended by SVGWG. Until now only Opera supports this and will be ignored by other browsers. Although this feature is only supported by SVG we have this method in JXG.AbstractRenderer because it is called from outside the renderer.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The SVG DOM Node which buffering type to update. |
type |
String | Either 'auto', 'dynamic', or 'static'. For an explanation see https://www.w3.org/TR/SVGTiny12/painting.html#BufferedRenderingProperty. |
Details
- Source
- renderer/abstract.js, line 1937
setClipPath(el, val)
Clip element to the JSXGraph container element (div). To be precise: to the SVG node in case of SVG rendering - the only renderer, where this is relevant.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object |
val |
Boolean | true: clip to the JSXGraph div, false: do not clip |
Details
- See
-
- JXG.SVGRenderer#setClipPathRect
- Source
- renderer/abstract.js, line 1947
setCssClass(el, cssClass)
Sets CSS classes for elements (relevant for SVG only).
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that wants a new set of CSS classes. |
cssClass |
String | String containing a space separated list of CSS classes. |
Details
- Source
- renderer/abstract.js, line 1956
setDashStyle(el)
Sets an element's dash style.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | An JSXGraph element. |
Details
- Source
- renderer/abstract.js, line 1962
setDraft(el)
Puts an object into draft mode, i.e. it's visual appearance will be changed. For GEONExT backwards compatibility.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that is in draft mode. |
Details
- Source
- renderer/abstract.js, line 1969
setGradient(el)
Sets up nodes for rendering a gradient fill.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object which gets the gradient |
Details
- Source
- renderer/abstract.js, line 1994
(private) setLayer(el, value)
Move element into new layer. This is trivial for canvas, but needs more effort in SVG. Does not work dynamically, i.e. if level is a function.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Element which is put into different layer |
value |
Number | Layer number |
Details
- Source
- renderer/abstract.js, line 2004
setLineCap(element)
Update the line endings (linecap) of a straight line from its attribute 'linecap'. Possible values for the attribute 'linecap' are: 'butt', 'round', 'square'. The default value is 'butt'. Not available for VML renderer.
Parameters
| Name | Type | Description |
|---|---|---|
element |
Line | A arbitrary line. |
Details
setObjectFillColor(el, color, opacity)
Sets an objects fill color.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that wants a new fill color. |
color |
String | Color in a HTML/CSS compatible format. If you don't want any fill color at all, choose 'none'. |
opacity |
Number | Opacity of the fill color. Must be between 0 and 1. |
Details
- Source
- renderer/abstract.js, line 2013
setObjectStrokeColor(el, color, opacity)
Changes an objects stroke color to the given color.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the JXG.GeometryElement that gets a new stroke color. |
color |
String | Color value in a HTML compatible format, e.g. #00ff00 or green for green. |
opacity |
Number | Opacity of the fill color. Must be between 0 and 1. |
Details
- Source
- renderer/abstract.js, line 2023
setObjectStrokeWidth(el, width)
Sets an element's stroke width.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to the geometry element. |
width |
Number | The new stroke width to be assigned to the element. |
Details
- Source
- renderer/abstract.js, line 2030
setObjectTransition(el, duration)
Sets the transition duration (in milliseconds) for fill color and stroke color and opacity.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference of the object that wants a new transition duration. |
duration |
Number | (Optional) duration in milliseconds. If not given, element.visProp.transitionDuration is taken. This is the default. |
Details
- Source
- renderer/abstract.js, line 2040
setPropertyPrim(node, key, val)
Sets a node's attribute.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The node that is to be updated. |
key |
String | Name of the attribute. |
val |
String | New value for the attribute. |
Details
- Source
- renderer/abstract.js, line 2048
setShadow(el)
Sets the shadow properties to a geometry element. This method is only a stub, it is implemented in the actual renderers.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to a geometry object, that should get a shadow |
Details
- Source
- renderer/abstract.js, line 2055
setTabindex(el)
Set the attribute tabindex to the attribute tabindex of an element.
This is only relevant for the SVG renderer.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement |
Details
- Source
- renderer/abstract.js, line 2063
show(el)
Shows a hidden element on the canvas; Only a stub, requires implementation in the derived renderer.
Please use JXG.AbstractRenderer#display instead
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to the object that has to appear. |
Details
- Deprecated
- Yes
- See
- Source
- renderer/abstract.js, line 2073
showTouchpoint(i)
Show a specific crosshair.
Parameters
| Name | Type | Description |
|---|---|---|
i |
Number | Number of the crosshair to show |
Details
- Source
- renderer/abstract.js, line 2314
suspendRedraw()
Stop redraw. This method is called before every update, so a non-vector-graphics based renderer can use this method to delete the contents of the drawing panel. This is an abstract method every descendant renderer should implement, if appropriate.
Details
transformRect(el, transformations)
Applies transformations on images and text elements. This method has to implemented in all descendant classes where text and image transformations are to be supported.
Only affine transformation are supported, no proper projective transformations. This means, the respective entries of the transformation matrix are simply ignored.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Image | Text | |
transformations |
Array | An array of JXG.Transformation objects. This is usually the
transformations property of the given element |
Details
- Source
- renderer/abstract.js, line 1600
unsuspendRedraw()
Restart redraw. This method is called after updating all the rendering node attributes.
Details
updateClipPath(el, valopt)
Update CSS property clip-path to HTML texts if overflow:hidden
has to be avoided.
TODO clipping for transformed texts
Parameters
| Name | Type | Attributes | Description |
|---|---|---|---|
el |
Text | Reference to an JXG.Text object that has to be clipped. |
|
val |
Boolean |
<optional> |
Set an explicit value, overwrites the element's attribute 'clip'. This is useful for handling the value 'inherit'. |
Details
- See
- Source
- renderer/abstract.js, line 1133
updateCurve(el)
Updates visual appearance of the renderer element assigned to the given JXG.Curve.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.Curve | Reference to a JXG.Curve object, that has to be updated. |
Details
updateEllipse(el)
Updates visual appearance of a given Circle on the JXG.Board.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Circle | Reference to a Circle object, that has to be updated. |
Details
updateEllipsePrim(node, x, y, rx, ry)
Updates an ellipse node primitive. This is an abstract method which has to be implemented in all renderers
that use the createPrim method.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | Reference to the node. |
x |
Number | Centre X coordinate |
y |
Number | Centre Y coordinate |
rx |
Number | The x-axis radius. |
ry |
Number | The y-axis radius. |
Details
- Source
- renderer/abstract.js, line 1694
updateGradient(el)
Updates the gradient fill.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | An JSXGraph element with an area that can be filled. |
Details
- Source
- renderer/abstract.js, line 2079
updateImage(el)
Updates the properties of an Image element.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Image | Reference to an JXG.Image object, that has to be updated. |
Details
updateImageStyle(el, doHighlight)
Updates CSS style properties of a Image node. In SVGRenderer opacity is the only available style element. This function is called by highlight() and nohighlight(). This function works for VML. It does not work for Canvas. SVGRenderer overwrites this method.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to the JXG.Image object, that has to be updated. |
doHighlight |
Boolean |
Details
updateImageURL(el)
If the URL of the image is provided by a function the URL has to be updated during updateImage()
Parameters
| Name | Type | Description |
|---|---|---|
el |
Image | Reference to an image object. |
Details
updateInternalText(el)
Updates visual properties of an already existing Text element.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to an JXG.Text object, that has to be updated. |
Details
(private) updateInternalTextStyle()
Set color and opacity of internal texts. This method is used for Canvas and VML. SVG needs its own version.
Details
updateLine(el)
Updates visual appearance of the renderer element assigned to the given JXG.Line.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Line | Reference to the Line object that has to be updated. |
Details
updateLinePrim(node, p1x, p1y, p2x, p2y, board)
Refreshes a line node. This is an abstract method which has to be implemented in all renderers that use
the createPrim method.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The node to be refreshed. |
p1x |
Number | The first point's x coordinate. |
p1y |
Number | The first point's y coordinate. |
p2x |
Number | The second point's x coordinate. |
p2y |
Number | The second point's y coordinate. |
board |
JXG.Board |
Details
- Source
- renderer/abstract.js, line 1706
(private) updateLineWithEndings(el, arrowData) → {JXG.AbstractRenderer}
Corrects the line length if there are arrow heads, such that the arrow ends exactly at the intended position. Calls the renderer method to draw the line.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Line | Reference to a line object, that has to be drawn |
arrowData |
Object | Data concerning possible arrow heads |
Returns
Reference to the renderer
- Type
- JXG.AbstractRenderer
Details
(private) updatePath(el) → {JXG.AbstractRenderer}
Calls the renderer method to draw a curve.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to a line object, that has to be drawn. |
Returns
Reference to the renderer
- Type
- JXG.AbstractRenderer
Details
updatePathPrim(node, pathString, board)
Updates a path element. This is an abstract method which has to be implemented in all renderers that use
the createPrim method.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The path node. |
pathString |
String | A string formatted like e.g. 'M 1,2 L 3,1 L5,5'. The format of the string depends on the rendering engine. |
board |
JXG.Board | Reference to the element's board. |
Details
- Source
- renderer/abstract.js, line 1716
updatePathStringBezierPrim(el)
Builds a path data string from a JXG.Curve element such that the curve looks like hand drawn. Since the path data strings heavily depend on the underlying rendering technique this method is just a stub. Although such a path string is of no use for the CanvasRenderer, this method is used there to draw a path directly.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement |
Details
- Source
- renderer/abstract.js, line 1746
updatePathStringPoint(el, size, type)
Builds a path data string to draw a point with a face other than rect and circle. Since the format of such a string usually depends on the renderer this method is only an abstract method. Therefore, it has to be implemented in the descendant renderer itself unless the renderer does not use the createPrim interface but the draw* interfaces to paint.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Point | The point element |
size |
Number | A positive number describing the size. Usually the half of the width and height of the drawn point. |
type |
String | A string describing the point's face. This method only accepts the shortcut version of
each possible face: |
Details
- Source
- renderer/abstract.js, line 1729
updatePathStringPrim(el)
Builds a path data string from a JXG.Curve element. Since the path data strings heavily depend on the underlying rendering technique this method is just a stub. Although such a path string is of no use for the CanvasRenderer, this method is used there to draw a path directly.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement |
Details
- Source
- renderer/abstract.js, line 1737
(private) updatePathWithArrowHeads(el, doHighlight)
Handles arrow heads of a line or curve element and calls the renderer primitive.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.GeometryElement | Reference to a line or curve object that has to be drawn. |
doHighlight |
Boolean |
Details
updatePoint(el)
Updates visual appearance of the renderer element assigned to the given JXG.Point.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Point | Reference to a Point object, that has to be updated. |
Details
updatePolygon(el)
Updates properties of a JXG.Polygon's rendering node.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Polygon | Reference to a JXG.Polygon object, that has to be updated. |
Details
updatePolygonPrim(node, el)
Update a polygon primitive.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | |
el |
Polygon | A JSXGraph element of type JXG.Polygon |
Details
- Source
- renderer/abstract.js, line 1753
updateRectPrim(node, x, y, w, h)
Update a rectangle primitive. This is used only for points with face of type 'rect'.
Parameters
| Name | Type | Description |
|---|---|---|
node |
Node | The node yearning to be updated. |
x |
Number | x coordinate of the top left vertex. |
y |
Number | y coordinate of the top left vertex. |
w |
Number | Width of the rectangle. |
h |
Number | The rectangle's height. |
Details
- Source
- renderer/abstract.js, line 1763
updateText(el)
Updates visual properties of an already existing Text element.
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to an JXG.Text object that has to be updated. |
Details
updateTextStyle(el, doHighlight)
Updates font-size, color and opacity properties and CSS style properties of a Text node. This function is also called by highlight() and nohighlight().
Parameters
| Name | Type | Description |
|---|---|---|
el |
Text | Reference to the JXG.Text object, that has to be updated. |
doHighlight |
Boolean |
Details
updateTicks(el)
Update Ticks on a JXG.Line. This method is only a stub and has to be implemented in any descendant renderer class.
Parameters
| Name | Type | Description |
|---|---|---|
el |
JXG.Ticks | Reference of a ticks object that has to be updated. |
Details
updateTouchpoint(i, pos)
Move a specific crosshair.
Parameters
| Name | Type | Description |
|---|---|---|
i |
Number | Number of the crosshair to show |
pos |
Array | New positon in screen coordinates |
Details
- Source
- renderer/abstract.js, line 2327
Inherited
none