Element Label
JXG.CoordsElement,JXG.GeometryElement
↳ JXG.Text
↳ Label
Labels are text objects tied to other elements like points, lines and curves.
Labels are handled internally by JSXGraph, only. There is NO constructor "board.create('label', ...)".
Defined in: text.js.
Extends
JXG.Text.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Automatic position of label text.
|
|
Label offset from label anchor.
|
|
Possible string values for the position of a label for
label anchor points are:
|
- Methods borrowed from class JXG.Text:
- _createFctUpdateText, _setText, checkForSizeUpdate, convertGeonext2CSS, convertGeonextAndSketchometry2CSS, convertSketchometry2CSS, crudeSizeEstimate, expandShortMath, generateTerm, getNumberofConflicts, getSize, hasPoint, notifyParents, replaceSub, replaceSup, setAutoPosition, setCoords, setText, setTextJessieCode, update, updateRenderer, updateSize, updateText, utf8_decode
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, show, showElement, snapToPoints, updateVisibility
- Methods borrowed from class JXG.CoordsElement:
- _anim, addAnchor, addConstraint, Dist, free, handleAttractors, handleSnapToPoints, makeGlider, moveAlong, moveTo, popSlideObject, setGliderPosition, setPositionByTransform, updateConstraint, updateCoords, updateGlider, updateGliderFromParent, updateTransform, visit, X, XEval, Y, YEval, Z, ZEval
- Events borrowed from class JXG.GeometryElement:
- attribute, attribute:key, down, drag, keydrag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, pendown, pendrag, penup, touchdown, touchdrag, touchup, up
Attribute Detail
{Boolean}
autoPosition
Automatic position of label text. When called first, the positioning algorithm
starts at the position defined by offset.
The algorithm tries to find a position with the least number of
overlappings with other elements, while retaining the distance
to the anchor element.
Defined in: options.js.
Defined in: options.js.
var p1 = board.create('point', [-2, 1], {id: 'A'}); var p2 = board.create('point', [-0.85, 1], { name: 'B', id: 'B', label:{autoPosition: true, offset:[10, 10]} }); var p3 = board.create('point', [-1, 1.2], { name: 'C', id: 'C', label:{autoPosition: true, offset:[10, 10]} }); var c = board.create('circle', [p1, p2]); var l = board.create('line', [p1, p2]);
- See:
- Label#offset
- Default Value:
- false
{Array}
offset
Label offset from label anchor.
The label anchor is determined by Label#position
Defined in: options.js.
Defined in: options.js.
- See:
- Label#position
- Default Value:
- [10,10]
{String}
position
Possible string values for the position of a label for
label anchor points are:
Defined in: options.js.
- 'lft'
- 'rt'
- 'top'
- 'bot'
- 'ulft'
- 'urt'
- 'llft'
- 'lrt'
Defined in: options.js.
- See:
- Label#offset
- Default Value:
- 'urt'
Attributes borrowed from other Elements
- Attributes borrowed from class JXG.GeometryElement:
- dash, draft, dragToTopOfLayer, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, needsRegularUpdate, precision, rotatable, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, tabindex, trace, traceAttributes, transitionDuration, transitionProperties, visible, withLabel
Fields borrowed from other Elements
- Fields borrowed from class JXG.Text:
- size
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, type, visProp, visPropCalc
- Fields borrowed from class JXG.CoordsElement:
- coords, groups, isConstrained, needsUpdateFromParent, onPolygon, slideObject, slideObjects
Methods borrowed from other Elements
- Methods borrowed from class JXG.Text:
- _createFctUpdateText, _setText, checkForSizeUpdate, convertGeonext2CSS, convertGeonextAndSketchometry2CSS, convertSketchometry2CSS, crudeSizeEstimate, expandShortMath, generateTerm, getNumberofConflicts, getSize, hasPoint, notifyParents, replaceSub, replaceSup, setAutoPosition, setCoords, setText, setTextJessieCode, update, updateRenderer, updateSize, updateText, utf8_decode
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, show, showElement, snapToPoints, updateVisibility
- Methods borrowed from class JXG.CoordsElement:
- _anim, addAnchor, addConstraint, Dist, free, handleAttractors, handleSnapToPoints, makeGlider, moveAlong, moveTo, popSlideObject, setGliderPosition, setPositionByTransform, updateConstraint, updateCoords, updateGlider, updateGliderFromParent, updateTransform, visit, X, XEval, Y, YEval, Z, ZEval
Events borrowed from other Elements