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

Classes


Element Slider

JXG.CoordsElement,JXG.GeometryElement
   ↳ JXG.Point
      ↳ Glider
            ↳ Slider

A slider can be used to choose values from a given range of numbers.

Defined in: slider.js.
Extends Glider.

Element Summary
Constructor Attributes Constructor Name and Description
 
Attributes Summary
Field Attributes Field Name and Description
 
Attributes for the base line of the slider.
 
Attributes for the highlighting line of the slider.
 
Attributes for the slider label.
 
Attributes for first (left) helper point defining the slider position.
 
Attributes for second (right) helper point defining the slider position.
 
The precision of the slider value displayed in the optional text.
 
Size of slider point.
 
The slider only returns integer multiples of this value, e.g.
 
Attributes for the ticks of the base line of the slider.
 
Show slider label.
 
Show slider ticks.
Field Summary
Field Attributes Field Name and Description
 
End value of the slider range.
 
Start value of the slider range.
 
Sets the maximum value of the slider.
 
Sets the minimum value of the slider.
 
Sets the value of the slider.
 
Returns the current slider value.
Methods borrowed from class Glider:
startAnimation, stopAnimation
Methods borrowed from class JXG.Point:
face, hasPoint, makeIntersection, normalizeFace, setStyle, update, updateRenderer, updateTransform
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints
Methods borrowed from class JXG.CoordsElement:
_anim, addAnchor, addConstraint, Dist, free, handleAttractors, handleSnapToPoints, makeGlider, moveAlong, moveTo, popSlideObject, setGliderPosition, setPositionByTransform, updateConstraint, updateCoords, updateGlider, updateGliderFromParent, visit, X, XEval, Y, YEval, Z, ZEval
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Element Detail
Slider
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "slider".

Possible parent array combinations are:
{Array} start
{Array} end
{Array} data

The first two arrays give the start and the end where the slider is drawn on the board. The third array gives the start and the end of the range the slider operates as the first resp. the third component of the array. The second component of the third array gives its start value.


Throws:
{Exception}
If the element cannot be constructed with the given parent objects an exception is thrown.
Examples:
// Create a slider with values between 1 and 10, initial position is 5.
var s = board.create('slider', [[1, 2], [3, 2], [1, 5, 10]]);

				
				
// Create a slider taking integer values between 1 and 50. Initial value is 50.
var s = board.create('slider', [[1, 3], [3, 1], [1, 10, 50]], {snapWidth: 1});

				
                
Attribute Detail
{Line} baseline
Attributes for the base line of the slider.
Defined in: options.js.

{Line} highline
Attributes for the highlighting line of the slider.
Defined in: options.js.

{Label} label
Attributes for the slider label.
Defined in: options.js.

{Point} point1
Attributes for first (left) helper point defining the slider position.
Defined in: options.js.

{Point} point2
Attributes for second (right) helper point defining the slider position.
Defined in: options.js.

{Number} precision
The precision of the slider value displayed in the optional text.
Defined in: options.js.
Default Value:
2

{Number} size
Size of slider point.
Defined in: options.js.
See:
Point#size
Default Value:
6

{Number} snapWidth
The slider only returns integer multiples of this value, e.g. for discrete values set this property to 1. For continuous results set this to -1.
Defined in: options.js.

{Ticks} ticks
Attributes for the ticks of the base line of the slider.
Defined in: options.js.

{Boolean} withLabel
Show slider label.
Defined in: options.js.
Default Value:
true

{Boolean} withTicks
Show slider ticks.
Defined in: options.js.
Default Value:
true
Field Detail
{Number} _smax
End value of the slider range.

{Number} _smin
Start value of the slider range.

{Object} setMax
Sets the maximum value of the slider.

{Object} setMin
Sets the minimum value of the slider.

{Object} setValue
Sets the value of the slider. This call must be followed by a board update call.

{Number} Value
Returns the current slider value.

Attributes borrowed from other Elements
Attributes borrowed from class JXG.GeometryElement:
dash, draft, fillColor, fillOpacity, fixed, frozen, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, needsRegularUpdate, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, trace, traceAttributes, visible

Fields borrowed from other Elements
Fields borrowed from class Glider:
slideObject
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, type, visProp
Fields borrowed from class JXG.CoordsElement:
coords, groups, needsUpdateFromParent, onPolygon, position, slideObjects

Methods borrowed from other Elements
Methods borrowed from class Glider:
startAnimation, stopAnimation
Methods borrowed from class JXG.Point:
face, hasPoint, makeIntersection, normalizeFace, setStyle, update, updateRenderer, updateTransform
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, handleSnapToGrid, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, showElement, snapToPoints
Methods borrowed from class JXG.CoordsElement:
_anim, addAnchor, addConstraint, Dist, free, handleAttractors, handleSnapToPoints, makeGlider, moveAlong, moveTo, popSlideObject, setGliderPosition, setPositionByTransform, updateConstraint, updateCoords, updateGlider, updateGliderFromParent, visit, X, XEval, Y, YEval, Z, ZEval

Events borrowed from other Elements
Events borrowed from class JXG.GeometryElement:
attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jul 05 2016 11:01:15 GMT+0200 (CEST)