Classes

EJSS_DRAWING2D.Arrow

ClassDescription
EJSS_DRAWING2D.ArrowArrow is a class to display vectors

Parent
EJSS_DRAWING2D.Element

PropertyDescriptionTypeDefaultValues
MarkEndOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-
MarkMiddleOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-
MarkStartOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-


EJSS_DRAWING2D.ArrowSet

ClassDescription
EJSS_DRAWING2D.ArrowSetArrowSet is a set of Arrows


PropertyDescriptionTypeDefaultValues
MarkEndOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-
MarkMiddleOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-
MarkStartOrientOrientation of the marker. Values are "auto" or the angle to rotate the markerint|String"auto"-


EJSS_DRAWING2D.Axis

ClassDescription
EJSS_DRAWING2D.AxisAn Axis is the 2D drawable used by PlottingPanels as decoration

Parent
EJSS_DRAWING2D.Segment



MethodDescriptionParamsReturnVisibility
getAutoTicks----
setAutoTicks-auto; --

EJSS_DRAWING2D.Custom

ClassDescription
EJSS_DRAWING2D.CustomA Custom element is a 2D drawing element that executes a user function for drawing

Parent
EJSS_DRAWING2D.Element



EJSS_DRAWING2D.DrawingPanel

ClassDescription
EJSS_DRAWING2D.DrawingPanelA DrawingPanel is a 2D drawing panel with no decoration.


PropertyDescriptionTypeDefaultValues
AutoScaleXWhether the panel should autoscale in the X dimensionboolean"false"-
AutoScaleYWhether the panel should autoscale in the Y dimensionboolean"false"-
BackgroundThe fill color for the main drawing area of the panel See this link for possible values.string Any valid CSS color name. "none" for no color"rgb(239,239,255) for DrawingPanels, White for PlottingPanels"-
CSSAn object with one or more CSS properties. Example { "background-color" : "red", "float" : "right" }Object"inline"-
ClassNameA classname for the element that can be used in CSS filesString"undefined"-
CursorTypeForMoveThe type of cursor when an element is moved. See this link for possible values.String"move"-
DisplayThe CSS display property of the element See this link for possible values.string"inline"-
DrawFillWhether to fill the main drawing area of the panel.boolean"true"-
DrawLinesWhether to draw the inner border of the panel (inside border of the gutter).boolean"true"-
EnabledWhether the panel should respond to user interaction. This is set to "false" by default, since 'listening' to interaction slows down the rendering.boolean"false"-
FillColorThe fill color for the main drawing area of the panel. Same as "Background" See this link for possible values.string Any valid CSS color name. "none" for no color"rgb(239,239,255) for DrawingPanels, White for PlottingPanels"-
ForegroundThe stroke color for the border of the main drawing area of the panel (inner border of the gutters) See this link for possible values.string Any valid CSS color name. "none" for no color"Black"-
GraphicsModeThe type of graphics implementation of the panel. Changing the graphics mode may influence what elements are actually displayed and the interaction response of the panel. But it may also influence the rendering speed.int or String. One of:
  • EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_SVG ("SVG" for short): SVG based drawing, full interaction, may be slower
  • EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_CANVAS ("CANVAS" for short): Canvas-based drawing, reduced interaction, usually faster
"SCALE_NUM"-
GuttersThe dimensions of a strip around the main panel drawing areaint[4] representing [left,top,right,bottom], the size of the strip (in pixels) in that part of the panel"[0,0,0,0] for DrawingPanels, [50,50,50,50] for PlottingPanels"-
GuttersColorThe fill color for the gutter. See this link for possible values.string Any valid CSS color name. "none" for no color"rgb(239,239,255) for DrawingPanels, rgb(211,216,255) for PlottingPanels"-
GuttersDrawLinesWhether to draw the outer border of the panel (exterior border of the gutter).boolean"true"-
GuttersFillWhether to fill the gutter.boolean"true"-
GuttersLineColorThe stroke color for the outer border of the panel (exterior border of the gutter). See this link for possible values.string Any valid CSS color name. "none" for no color"Black"-
GuttersLineWidthThe stroke width for the outer border of the panel (exterior border of the gutter).int width in pixels"1"-
GuttersRenderingSVG shape rendering for the guttersstring"auto""auto","optimizeSpeed","crispEdges","geometricPrecision"
HeightThe height of the HTML5 element. See this link for possible values.int or String"auto"-
LineColorThe stroke color for the border of the main drawing area of the panel (inner border of the gutters). Same as "Foreground". See this link for possible values.string Any valid CSS color name. "none" for no color"Black"-
LineWidthThe stroke width for the border of the main drawing area of the panel (inner border of the gutters).int width in pixels"1"-
MarginXWhen autoscaling the X axis, the percentage of the X range that should be left (on both sides) around the elementsint or double (in the range [0,100])"0"-
MarginYWhen autoscaling the Y axis, the percentage of the Y range that should be left (on both sides) around the elementsint or double (in the range [0,100])"0"-
MaximumXThe maximum value for the X coordinates of elements. If specified, the maximum is respected even if AutoscaleX is true and there are no elements close to the maximum.int or double"+1"-
MaximumXYThe maximum value for the Y coordinates of elements. If specified, the maximum is respected even if AutoscaleY is true and there are no elements close to the maximum.int or double"+1"-
MinimumXThe minimum value for the X coordinates of elements. If specified, the minimum is respected even if AutoscaleX is true and there are no elements close to the minimum.int or double"-1"-
MinimumYThe minimum value for the Y coordinates of elements. If specified, the minimum is respected even if AutoscaleY is true and there are no elements close to the minimum.int or double"-1"-
ScaleXTypeThe type of scale for the X axisint or String. One of:
  • EJSS_DRAWING2D.DrawingPanel.SCALE_NUM ("SCALE_NUM" for short)
  • EJSS_DRAWING2D.DrawingPanel.SCALE_LOG ("SCALE_LOG" for short)
"SCALE_NUM"-
ScaleYTypeThe type of scale for the Y axisint or String. One of:
  • EJSS_DRAWING2D.DrawingPanel.SCALE_NUM ("SCALE_NUM" for short)
  • EJSS_DRAWING2D.DrawingPanel.SCALE_LOG ("SCALE_LOG" for short)
"SCALE_NUM"-
SquareAspectWhether the panel should modify its scales to keep a 1:1 aspect ratio.boolean"false"-
StopEventPropagationWhether to propagate events and gestures to the containing HTML element. This may be useful, for instance, to prevent ePub readers from reacting to what should be just an interaction with the panel.boolean"true"-
StopMoveEventsWhether to enable the move event listener. This is set to "false" by default and is ignored when Enabled is set to "false".boolean"false"-
VisibilityWhether the element is visiblebooleantrue-
WidthThe width of the HTML5 element. See this link for possible values.int or String"auto"-


MethodDescriptionParamsReturnVisibility
addDecorationAdds a decoration to the panel. Decorations are drawn before any other elements.drawable decoration element; position integer; istop top decoration; --
addElementAdd a element to the panel. Elements are asked to draw themselves whenever the panel needs to render. For this purpose, they will receive a calls to draw(). Elements are reported of changes in the world coordinates of the panel, in case they need to recalculate themselves.element Element; position int; --
checkMeasureRecalculate world dimensions using measure elements-boolean whether dimesions update-
disableDisable rendering---
enableEnable rendering---
getAutoScaleGet auto-scale-boolean-
getAutoScaleXGet auto-scale in X-boolean-
getAutoScaleYGet auto-scale in Y-boolean-
getControllerReturns the controller object-Controller-
getElementsReturn the array of a elements.-Elements-
getEnabledDraggingType of motion allowed to drag panel-motion-
getEnabledZoomingWhether panal scaling is allowed-boolean-
getGraphicsReturns the graphics implementation-Graphics-
getGraphicsModeGet the graphics mode-One of the possible graphics implementation mode: EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_SVG or EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_CANVAS-
getGraphicsModeNameGet the graphics mode-The implementation mode as a string: either "SVG" or "CANVAS"-
getGuttersReturn the bounding gutters-Gutters-
getGuttersStyleReturn the drawing style of the bounding gutters-Style-
getInnerRectReturn drawing box (excluding gutters)-box-
getInvertedScaleYGet inverted scale in Y-boolean-
getMarginXGet margin X-margin-
getMarginYGet margin Y-margin-
getMeasuredCoordinatesGets the measured coordinates for the panel-bounds-
getNameGet name for drawing panel-string-
getPanelInteractionReturn Panel Interactionpanel interaction; --
getPixelPositionWorldOriginGet pixel position of the origin-array pixel position-
getRealWorldCoordinatesGets the user coordinates for the panel-bounds-
getRealWorldXMaxReturns the maximum X coordinate for the panel-double-
getRealWorldXMinReturns the minimum X coordinate for the panel-double-
getRealWorldYMaxReturns the maximum Y coordinate for the panel-double-
getRealWorldYMinReturns the minimum Y coordinate for the panel-double-
getShowAreaRectangleShow area rectangle in panelboolean; --
getShowCoordinatesWhether coordinates in panel are showed-boolean-
getStyleReturn the drawing style of the inner rectangle for panel-Style-
getTypeScaleXGet type of scale in X-int-
getTypeScaleYGet type of scale in Y-int-
getWorldCoordinatesGets the preferred user coordinates for the panel-bounds-
getWorldXMaxReturns the preferred maximum X coordinate for the panel-double-
getWorldXMinReturns the preferred minimum X coordinate for the panel-double-
getWorldYMaxReturns the preferred maximum Y coordinate for the panel-double-
getWorldYMinReturns the preferred minimum Y coordinate for the panel-double-
getZoomLimitsGet zoom limits-limits [min,max]-
getZoomRateGet zoom rate-rate-
importGraphicsReturns the svg image in Base64 formatcallback; string-
indexOfElementReturn the position of a element.element Element; integer-
recomputeScalesRecomputes the scales of the panel.---
removeDecorationRemoves a decorationdrawable decoration element; --
removeElementRemove a element to the panel.element Element; --
renderRender the scene---
reportDecorationsReport event to decoration elementsevent; --
resetReset the scene---
scaleForce scale again---
serializeGet JSON object with private variables--private
setAutoScaleSet auto-scaleauto; --
setAutoScaleXSet auto-scale in Xauto; --
setAutoScaleYSet auto-scale in Yauto; --
setControllerSet the controllerController; --
setEnabledDraggingAllow to drag panel---
setEnabledZoomingAllow to scale panelallowed; --
setGraphicsModeSet graphicsmode One of the possible graphics implementation mode: EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_SVG or EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_CANVAS. Or simply "CANVAS" or "SVG"; --
setGuttersSets the gutters dimensionsrect the number of pixels for the drawing area; --
setInvertedScaleYSet inverted scale in Yinverted; --
setMarginXSet margin Xmargin; --
setMarginYSet margin Ymargin; --
setShowAreaRectangleShow area rectangle in panelboolean; --
setShowCoordinatesShow coordinates in panelboolean; --
setSquareAspectWhether the panel should keep a 1:1 aspect ratio between X and Y coordinatesboolean; --
setTypeScaleXSet type of scale in Xtype; --
setTypeScaleYSet type of scale in Ytype; --
setWorldCoordinatesSets the preferred user coordinates for the panelbounds; --
setWorldXMaxSets the preferred maximum X coordinate for the panelxmax; --
setWorldXMinSets the preferred minimum X coordinate for the panelxmin; --
setWorldYMaxSets the preferred maximum Y coordinate for the panelymax; --
setWorldYMinSets the preferred minimum Y coordinate for the panelymin; --
setZoomLimitsSet zoom limitslimits [min,max]; --
setZoomRateSet zoom raterate; --
toPanelLogScaleProjects a value in pixel coordinates from a decimal scale (defined by origin, min, max and pixratio) to a log scale in world coordinatesvalue double The original value; origin double The origin in panel (pixels); min double The min value in world coordinates; max double The max value in world coordinates; pixratio double The pixels per unit for panel; double The value transformed-
toPanelModTo be used only after a call to render()! Projects a module from pixel coordinates to world coordinatespoint double[] The original module; double[] The same array once transformed-
toPanelPositionTo be used only after a call to render()! Projects a point from pixel coordinates to world coordinatespoint double[] The original coordinates; scale double[] The type of scale (LOG or NUM); double[] The same array once transformed-
toPixelAxisXConverts a X pixel value so that 0 is at the leftx double; --
toPixelAxisYConverts a Y pixel value so that 0 is at the bottomy double; --
toPixelLogScaleProjects a value in world coordinates from a decimal scale (defined by origin, min, max and pixratio) to a log scale in pixel coordinatesvalue double The original value; origin double The origin in panel (pixels); min double The min value in world coordinates; max double The max value in world coordinates; pixratio double The pixels per unit for panel; double The value transformed-
toPixelModTo be used only after a call to render()! Projects a module from world coordinates to pixel coordinatespoint double[] The original module; double[] The same array once transformed-
toPixelPositionTo be used only after a call to render()! Projects a point from world coordinates to pixel coordinates.point double[] The original coordinates; scale double[] The type of scale (LOG or NUM); double[] An array with the result-
touchRefresh all elements---
unserializeSet JSON object with private variables--private

EJSS_DRAWING2D.Element

ClassDescription
EJSS_DRAWING2D.ElementBasic Element 2D


PropertyDescriptionTypeDefaultValues
AttributesInline SVG attributtesobject-{nameAttr1:value1,nameAttr2:value2,..}
BoundsPosition of the bounding box of the elementObject{left,rigth,top,bottom}--
DiameterDiameter, i.e. the value of the width and the heightdouble--
DrawFillWhether the fill color is drawedbooleantrue-
DrawLinesWhether the stroke is drawedbooleantrue-
EnabledPositionWhether the user could change the positionbooleanfalse-
EnabledSizeWhether the user could change the sizebooleanfalse-
FillColorFill colorstring"none"-
LineColorStroke colorstring"Black"-
LineWidthStroke widthdouble0.5-
MeasuredMeasurability of the elementbooleantrue-
MovesGroupWhether the group position also changes when the element position changesbooleanfalse-
ParentParent of the elementPanel|Group--
PixelPositionWhether the position is in pixelsbooleanfalse-
PixelSizeWhether the size is in pixelsbooleanfalse-
PositionCoordinates X and Ydouble[2][0,0]-
RadiusRadius, i.e. the half of the diameterdouble--
RelativePositionPosition of the coordinates X and Y relative to the elementstring|int"CENTER""CENTER":0,"NORTH":1,"SOUTH":2,"EAST":3,"WEST":4,"NORTH_EAST":5,"NORTH_WEST":6, "SOUTH_EAST":7,"SOUTH_WEST":8
ResizesGroupWhether the group size also changes when the element size changesbooleanfalse-
RotateRotation of the elementint0int:angle in radians to rotate the element with origin its position
ScaleXScale transformation of the element in Xfloat1float: scale in X
ScaleYScale transformation of the element in Yfloat1float: scale in Y
SensitivitySensitivity in pixels when the user touchs the elementint20-
ShapeRenderingSVG shape renderingstring"auto""auto","optimizeSpeed","crispEdges","geometricPrecision"
SizeSize along the X and Y axesdouble[2][1,1]-
SizeXSize along the X axisdouble1-
SizeYSize along the Y axisdouble1-
SkewXSkew transformation of the element in Xfloat1float: skew angle in X
SkewYSkew transformation of the element in Yfloat1float: skew angle in Y
TransformationInternal transformation of the elementint|float[6]|string0int:angle in radians to rotate the element with origin its position, float[9]: transformation matrix - [scaleX, skewY, skewX, scaleY, translateX, translateY]
VisibilityWhether the element is visiblebooleantrue-
XPosition in Xdouble0-
YPosition in Ydouble0-

ActionDescription
OnDoubleClickEvent when double click
OnDragEvent when the mouse drags the element
OnEnterEvent when the mouse enters in the element
OnExitEvent when the mouse exits the element
OnPressEvent when the mouse clicks over the element
OnReleaseEvent when the mouse release the element

MethodDescriptionParamsReturnVisibility
copyToCopies itself to another elementelement Element; -private
getAbsoluteBoundsReturns bounds for an element (after applying groups)withTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); Object{left,rigth,top,bottom}public
getAbsolutePositionReturns the absolute position in the panel (after applying groups)withTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); double[2]private
getAbsoluteSizeReturns the absolute world sizes in the panel (after applying groups)-double[2]private
getBoundsReturns bounds for an element-Object{left,rigth,top,bottom}public
getControllerReturns the controller object-Controllerprivate
getCustomObjectRetrieve an object for internal use-Objectprotected
getGroupGet the group of this element, if any-Groupprivate
getGroupPanelReturns the DrawingPanel in which it (or its final ancestor group) is displayed-DrawingPanelprivate
getInfoGets information for element-stringprivate
getInteractionTargetReturns array of the interaction targets defined by the element-targetsprivate
getNameGets name for element-stringpublic
getPanelGets the panel for this element-DrawingPanelprivate
getParentGets the property Parent-Panel|Grouppublic
getPixelPositionReturns pixel coordinateswithTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); double[2]private
getPixelPositionOfReturns pixel coordinates for the given point in the element's world coordinateswithTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); double[2]private
getPixelSizeOfReturns pixel sizes for the given sizes in the element's world coordinates-double[2]private
getPixelSizesReturns pixel sizeswithTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); double[2]private
getPositionGets the property Position-double[2]public
getRotateGets the property Rotate-Rotate anglepublic
getScaleXGets the property ScaleX-scale ratepublic
getScaleYGets the property ScaleY-scale ratepublic
getSetGets the set of this element, if any-ElementSetprivate
getSetIndexGets the index of this element in a set, if any-intprivate
getSizeGets the property Size-double[]public
getSizeXGets the property SizeX-doublepublic
getSizeYGets the property SizeY-doublepublic
getSkewXGets the property SkewX-skew anglepublic
getSkewYGets the property SkewY-skew anglepublic
getStyleReturn the style associated to the element-Stylepublic
getTransformationGets the property Transformation-Transformation - [scaleX, skewY, skewX, scaleY, translateX, translateY]public
getX()Gets the property X-doublepublic
getY()Gets the property Y-doublepublic
isChangedWhether the element has changed-booleanprivate
isGroupIs the element a group-booleanpublic
isGroupChangedReturns whether the element group has changed-booleanprivate
isGroupVisibleReturns the real visibility status of the element, which will be false if it belongs to an invisible group-booleanpublic
isMeasuredGets the property Measured-booleanpublic
isMustProjectWhether the element needs to project. Typically used by the dawing panel whenever it changes its scales-booleanprivate
isPixelPositionReturns the property PixelPosition-booleanpublic
isPixelSizeGets the property PixelSize-booleanpublic
isVisibleGets the property Visibility-booleanpublic
registerPropertiesRegisters properties in a ControlElementcontroller A ControlElement that becomes the element controller; -private
serializeGet JSON object with private variables--private
setAbsolutePositionSets the absolute position in the panel (after applying groups) Note: Transformations are not considered and it is not supported when pixel position is used-double[2]private
setAbsoluteXSets the absolute position X in the panel (after applying groups) Note: Transformations are not considered and it is not supported when pixel position is used-doubleprivate
setAbsoluteYSets the absolute position Y in the panel (after applying groups) Note: Transformations are not considered and it is not supported when pixel position is used-doubleprivate
setBoundsSets bounds for an elementObject{left,rigth,top,bottom}|[left,rigth,top,bottom]; -public
setChangedTells the element that it has changed Typically used by subclasses when they change something.changed boolean; -private
setControllerSets the controllerController; -private
setCustomObjectStore an object for internal use--protected
setGroupSets the group of this elementgroup Group; -private
setMeasuredSets the property Measuredmeasured boolean; -public
setMustProjectTells the element whether it should reproject its points because the panel has changed its projection parameters. Or, the other way round, sets it to false if someone (typically methods in subclasses) took care of this alreadyneedsIt boolean; -private
setPanelSets the panel for this elementpanel DrawingPanel; -private
setParentSets the property Parentparent Panel or Group; -public
setPixelPositionSets the property PixelPositionpixel boolean; -public
setPixelSizeSets the property PixelSizepixel boolean; -public
setPositionSets the property Positionposition double[2]; -public
setRotateSets the property RotateRotate angle; -public
setScaleXSets the property ScaleXscale rate; -public
setScaleYSets the property ScaleYscale rate; -public
setSetSets the index of this element in the setset ElementSet; index int; -private
setSizeSets the property Sizeposition double[2]; -public
setSizeXSets the property SizeXsizeX double; -public
setSizeYSets the property SizeYsizeY double; -public
setSkewXSets the property SkewXskew angle; -public
setSkewYSets the property SkewYskew angle; -public
setTransformationSets the property Transformationtrans transformation - [scaleX, skewY, skewX, scaleY, translateX, translateY]; -public
setVisibleSets the property Visibilityvisible boolean; -public
setX(x)Sets the property Xx double; -public
setY(y)Sets the property Yy double; -public
toElementSpaceTransforms a double[] point in the group's world coordinates to the element's world coordinates Note: Transformations are not considered!point double[] The original coordinates in the body frame; double[] The same array once translatedprivate
toGroupSpaceTransforms a double[] point in the element's world coordinates to the group's world coordinatespoint double[] The original coordinates in the body frame; withTransf bool Considering group transformations; double[] The same array once transformedprivate
toGroupSpaceModTransforms a module (longitude or size) in the element's world coordinates to the group's world coordinatesmod double[] The original module in the body frame; double[] The same array once transformedprivate
unserializeSet JSON object with private variables--private

EJSS_DRAWING2D.Histogram

ClassDescription
EJSS_DRAWING2D.HistogramA Histogram displays a diagram of frequencies of data

Parent
EJSS_DRAWING2D.Element

PropertyDescriptionTypeDefaultValues
ActiveWhether the histogram actually accepts input valuesbooleantrue-
BinWidthThe width of the bins. This is the maximum distance that makes two inputs contribute to the same bin height. As an example, is the with is 0.5, the inputs 1.1 and 1.4 will add their occurrences to the same binint or double1-
ClearAtInputWhether to clear old data whenever new data gets inbooleanfalse-
DiscreteWhether the bins are discrete or continuous. A discrete bin looks like a thin vertical line, a continuous one looks like a bar with the width of the binbooleanfalse-
FixBinFix bin in the inputdouble0-
NormalizedWhether the data are normalized to onebooleanfalse-
OccurrencesThe number of the occurrences of the inputint or double1-
PixelPositionThe input value to appenddouble or double[]false-


MethodDescriptionParamsReturnVisibility
getBigMarkGets the interval for big marks-intpublic
getMediumMarkGets the interval for medium marks-value intpublic
getNumberOfMarksGets the number of marks-intpublic
getPrecisionGets the number of digits for the marks-intpublic
setBigMark(value)Sets the interval for big marksvalue int; -public
setDigits(value)Sets the number of digits for the marksvalue int; -public
setMediumMark(value)Sets the interval for medium marksvalue int; -public
setNumberOfMarks(value)Sets the number of marksvalue int; -public

EJSS_DRAWING2D.PlottingPanel

ClassDescription
EJSS_DRAWING2D.PlottingPanelA PlottingPanel is a 2D drawing panel with added decoration. The decoration includes axes, gutters and titles.

Parent
EJSS_DRAWING2D.DrawingPanel

PropertyDescriptionTypeDefaultValues
TitleThe title at the top center of the panelString"Plot"-


MethodDescriptionParamsReturnVisibility
getAxisX()--the axis element for the X dimensionpublic
getAxisY()--the axis element for the Y dimensionpublic
getBigMarkGets the interval for big marks-intpublic
getMarkFactorGets the factor that divide the displayed value in marks-int|doublepublic
getMaximumMarkGets the maximum value to display in a mark-value int|doublepublic
getMediumMarkGets the interval for medium marks-intpublic
getNumberOfMarksGets the number of marks-intpublic
getPrecisionGets the number of digits for the marks-intpublic
setBigMark(value)Sets the interval for big marksvalue int; -public
setDigits(value)Sets the number of digits for the marksvalue int; -public
setMarkFactor(value)Sets the factor that divide the value in marksvalue int|double; -public
setMaximumMark(value)Sets the maximum value to display in a markvalue int|double; -public
setMediumMark(value)Sets the interval for medium marksvalue int; -public
setNumberOfMarks(value)Sets the number of marksvalue int; -public

EJSS_DRAWING2D.Segment

ClassDescription
EJSS_DRAWING2D.SegmentA Segment is a 2D drawing element that displays a single line

Parent
EJSS_DRAWING2D.Element



EJSS_DRAWING2D.Shape

ClassDescription
EJSS_DRAWING2D.ShapeA Shape is a 2D drawing element that displays a 2D shape (such as a rectangle, ellipse, etc.)

Parent
EJSS_DRAWING2D.Element

PropertyDescriptionTypeDefaultValues
CornerRadiusRadius for the corners of a round rectangular shapeint10-
FillColor--"Blue"-
LineColor--"Black"-
RelativePosition--"CENTER"-
ShapeTypeType of shapeint|String"ELLIPSE"0:"NONE", 1:"ELLIPSE", 2:"RECTANGLE", 3:"ROUND_RECTANGLE", 4:"WHEEL", 5:"POINT"
Size--[0.1,0.1]-


MethodDescriptionParamsReturnVisibility
copyToExtended copyTo methodElement; -private
getClassReturns the class name-Stringprivate
getCornerRadiusGets the value of the property CornerRadius-int-
getShapeTypeGets the value of the property ShapeType-int|Stringpublic
registerPropertiesExtended registerProperties methodcontroller; -private
setCornerRadiusSets the value of the property CornerRadiusradius int; --
setShapeType(shapeType)Sets the value of the property ShapeTypeshapeType int|String; -public

EJSS_DRAWING2D.SimplePanel

ClassDescription
EJSS_DRAWING2D.SimplePanelA SimplePanel is a 2D drawing panel with no decoration.




MethodDescriptionParamsReturnVisibility
setRadiusSet radiusradius; --

EJSS_DRAWING2D.Text

ClassDescription
EJSS_DRAWING2D.TextA Text is a 2D drawing element that displays a text

Parent
EJSS_DRAWING2D.Element

PropertyDescriptionTypeDefaultValues
FillColorFill colorString"none"-
FontFont description in one declarationString - https://www.w3schools.com/cssref/pr_font_font.asp"20px Arial"-
FontFamilyFont familyString"Arial"-
FontSizeFont sizeString"20"-
FontStyleFont styleString"normal"-
OutlineColorOutline colorString"none"-
TextTextString""-


MethodDescriptionParamsReturnVisibility
getTextGets text-stringpublic
setTextSets textstring; -public

EJSS_DRAWING2D.Trace

ClassDescription
EJSS_DRAWING2D.TraceA Trace is a sophistication of the Trail element. The extra features are the possibility to specify markers that will be displayed at each point of the trace.

Parent
EJSS_DRAWING2D.Trail

PropertyDescriptionTypeDefaultValues
MarkAxisYAxis for bar or area markersint0-
MarkDrawFillWhether the marker are filledbooleantrue-
MarkDrawLinesWhether the marker lines are drawnbooleantrue-
MarkFillColorThe fill color for the markersString"Blue"-
MarkLineColorColor for the lines of the markersString"Black"-
MarkLineWidthMarker stroke widthdouble0.5-
MarkRelativePositionPosition of the marker relative to the pointint|String"CENTER"CENTER":0,"NORTH":1,"SOUTH":2,"EAST":3,"WEST":4,"NORTH_EAST":5,"NORTH_WEST":6, "SOUTH_EAST":7,"SOUTH_WEST":8
MarkSizeSize of the marker to drawint[2] providing the width and height in pixels[0,0]-
MarkTypeType of marker to drawint|String"ELLIPSE"0="ELLIPSE", 1="RECTANGLE", 2:"AREA", 3:"BAR"


MethodDescriptionParamsReturnVisibility
getMarkAxisY()Get the limit axis for bar or area marks-intpublic
getMarkSize()Get the sizes of the mark-double[]public
getMarkStyle()Return the style of the mark--public
getMarkStyleList()Get the list of styles-listpublic
getMarkType()Get the type of the mark-intpublic
setMarkAxisY()Set the limit axis for bar or area marksint; -public
setMarkSize(size)Set the size of the marksize int[2]|double[2] array with the size in pixels; -public
setMarkType(type)Set the type of the marktype int|String One of: "CENTER":0,"NORTH":1,"SOUTH":2,"EAST":3,"WEST":4,"NORTH_EAST":5,"NORTH_WEST":6, "SOUTH_EAST":7,"SOUTH_WEST":8; -public

EJSS_DRAWING2D.Trail

ClassDescription
EJSS_DRAWING2D.TrailA Trail is a two-dimensional drawable that displays a collection of points in the plane. The points are added to the trail either through the InputX and InputY properties, or using the element’s addPoint or moveToPoint functions. The points are displayed using lines which connect the points, each with the previous one, thus forming a polygonal line (which looks like a trail). The trail can be disconnected at some points if the Connected property is set temporarily to false, or if the moveToPoint function is used.
The number of points in a trail can be limited through the Maximum property. Adding points past the limit causes the trail to remove the first points in it.

Trails can be broken into several segments using the newSegment function. Each segment behaves like a sub-trail, but segments can have different drawing styles (line width and color). Also, the user can delete the points in the last segment without affecting the previous segments.

Parent
EJSS_DRAWING2D.Element

PropertyDescriptionTypeDefaultValues
ActiveWhether the trail should accept input points.booleantrue-
ClearAtInputWhether the trail clears all points when receiving new input. (Useful if input is an array.)booleanfalse-
ConnectedWhether the next input point should be connected to the previous one.booleantrue-
InputThe next input point for the trail.int[2]|double[2] An array with a pair of [x,y] coordinates, or int[n][2]|double[n][2] a double array with n pairs of [x,y] coordinates."none"-
InputXThe X coordinate for the next input point for the trail.int|double The X coordinate for the input point or int[n]|double[n] a double array with the X coordinates for n input points."none"-
InputYThe Y coordinate for the next input point for the trail.int|double The Y coordinate for the input point or int[n]|double[n] a double array with the Y coordinates for n input points."none"-
MaximumThe maximum number of points the trail accepts. If more input is received, the trail will discard the corresponding first points.int0 indicating no limit-
NoRepeatWhether the trail ignores repeated input pointsbooleanfalse-
RelativePosition--"SOUTH_WEST"-
SkipWhether the trail should display only one oout of many inpout points. If Skip is positive, it indicates how many points the trail will take to display one.int0-


MethodDescriptionParamsReturnVisibility
addPoint(x,y,style)Adds a new point to the trail.x double The X coordinate of the point or point double[] The double[2] array with the coordinates of the point.; y double The Y coordinate of the point.; style int an optional connection style: 0 = EJSS_DRAWING2D.Trail.NO_CONNECTION, 1 = EJSS_DRAWING2D.Trail.LINE_CONNECTION; -public
addPoints(x,y)Adds an array of points to the trail.x double The double[] array with the X coordinates of the points. or point double[][] The double[nPoints][2] array with the coordinates of the points.; y double The double[] array with the Y coordinates of the points.; -public
clear()Clears all points from all segments of the trail.--public
clearLastSegment()Clears all points from the last segment of the trail.--public
getActive()Whether the trail is in active mode.-boolean-
getClearAtInput()Whether the trail is in clear at input mode.-booleanpublic
getConnected()Gets the connection state.-booleanpublic
getMaximumPoints()Returns the maximum number of points allowed for the trail-intpublic
getNoRepeat()Whether the trail is in no repeat mode.-boolean-
getSkip()Returns the skip parameter of the trail.-intpublic
initialize()Clears all points from the last segment of the trail, respecting previous segments.--public
moveToPoint(x,y)Moves to the new point without drawing. (Equivalent to setting the connection type to NO_CONNECTION and adding one single point, then setting the type back to its previous value.)x double The X coordinate of the point. or point double[] The double[2] array with the coordinates of the point.; y double The Y coordinate of the point.; -public
newSegment()Creates a new segment of the trail.--public
reset()Same as clear--public
serializeGet JSON object with private variables--private
setActive(active)Sets the active state of the trail. An inactive trail ignores all input.active boolean; -public
setClearAtInput(clear)Sets the trail to clear existing points when receiving a new point or array of points.clear boolean; -public
setConnected(connected)Whether to connect next input point with the previous oneconnected boolean; -public
setMaximumPoints(maximum)Sets the maximum number of points for the trail. Once the maximum is reached, adding a new point will cause remotion of the first one. This is useful to keep trails down to a reasonable size, since very long trails can slow down the rendering (in certain implementations). If the value is 0 (the default) the trail grows forever without discarding old points.maximum int; -public
setNoRepeat(noRepeat)Sets the no repeat state of the trail. When set, a trail will ignore (x,y) points which equal the last added point.noRepeat boolean; -public
setSkip(skip)Sets the skip parameter. When the skip parameter is larger than zero, the trail only considers one of every 'skip' points. That is, if skip is 3, the trail will consider only every third point sent to it. The default is zero, meaning all points must be considered.skip int; -public
unserializeSet JSON object with private variables--private

EJSS_DRAWING3D.Arrow

ClassDescription
EJSS_DRAWING3D.ArrowArrow is a class to display vectors in 3D


PropertyDescriptionTypeDefaultValues
HeadHeightRatio arrow_length/head_lengthdouble"8"-
HeadWidthRatio arrow_length/head_widthdouble"20"-


EJSS_DRAWING3D.ArrowSet

ClassDescription
EJSS_DRAWING3D.ArrowSetArrowSet is a set of Arrows


PropertyDescriptionTypeDefaultValues
HeadHeightRatio arrow_length/head_lengthdouble"8"-
HeadWidthRatio arrow_length/head_widthdouble"20"-


EJSS_DRAWING3D.Cylinder

ClassDescription
EJSS_DRAWING3D.CylinderCylinder


PropertyDescriptionTypeDefaultValues
BottomRadiusBottom radiusnumber1-
MaxAngleUMaximum angle in drawingnumber360-
MinAngleUMinimum angle in drawingnumber0-
TopRadiusTop radiusnumber1-


MethodDescriptionParamsReturnVisibility
setOriginAndEndChanges the position and Size Z and adds an extra transformation so that the axis of the element has the prescribed origin and end pointsorigin a double[3] array with the origin of the axis; end a double[3] array with the end point of the axis; --

EJSS_DRAWING3D.Disk

ClassDescription
EJSS_DRAWING3D.DiskDisk




EJSS_DRAWING3D.DrawingPanel

ClassDescription
EJSS_DRAWING3D.DrawingPanelA DrawingPanel is a 3D drawing panel.


PropertyDescriptionTypeDefaultValues
CameraAltitudeCamera rotation in Y axis.int or double (degrees)0-
CameraAzimuthCamera rotation in Z axis.int or double (degrees)0-
CameraFarFar plane in 3D projection.int10000-
CameraFocusXCamera focus in X axis.int or double0-
CameraFocusYCamera focus in Y axis.int or double0-
CameraFocusZCamera focus in Z axis.int or double0-
CameraNearNear plane in 3D projection.int1-
CameraTiltCamera rotation in X axis.int or double (degrees)0-
CameraUpVectorXCamera up vector in X axis.int or double0-
CameraUpVectorYCamera up vector in Y axis.int or double0-
CameraUpVectorZCamera up vector in Z axis.int or double0-
CameraXCamera position in X axis.int or double4-
CameraYCamera position in Y axis.int or double0-
CameraZCamera position in Z axis.int or double0-
CameraZoomRateCamera zoom rate.int or double1.10-
LightsLights in scene.array of array[[1,2,3]]-
MaximumXThe maximum value for the X coordinates of elements.int or double"+1"-
MaximumYThe maximum value for the Y coordinates of elements.int or double"+1"-
MaximumZThe maximum value for the Z coordinates of elements.int or double"+1"-
MinimumXThe minimum value for the X coordinates of elements.int or double"-1"-
MinimumYThe minimum value for the Y coordinates of elements.int or double"-1"-
MinimumZThe minimum value for the Z coordinates of elements.int or double"-1"-
PerspectiveField of view when perspective on. A parameter that gives more or less perspective to the projection.int (degrees)"45"-
ProjectionType of projection.int or string"PERSPECTIVE_ON""PLANAR_XY": 0; "PLANAR_XZ": 1; "PLANAR_YZ": 2; "PERSPECTIVE_OFF": 3; "PERSPECTIVE_ON": 4;
SizeXSize for the X axis.int or double1-
SizeYSize for the Y axis.int or double1-
SizeZSize for the Z axis.int or double1-


MethodDescriptionParamsReturnVisibility
addDecorationAdds a decoration to the panel. Decorations are drawn before any other elements.drawable decoration element; position integer; --
addElementAdd a element to the panel. Elements are asked to draw themselves whenever the panel needs to render. For this purpose, they will receive a calls to draw(). Elements are reported of changes in the world coordinates of the panel, in case they need to recalculate themselves.element Element; position int; --
getAutoCameraGets auto camera-boolean-
getCamAltitudeGets altitude for camera-altitude-
getCamAzimuthGets azimuth for camera-azimuth-
getCamFocusGets focus for camera-vector-
getCamFocusXGets X focus for camera-x-
getCamFocusYGets Y focus for camera-y-
getCamFocusZGets Z focus for camera-z-
getCamLocGets coordinates for camera-vector-
getCamLocXGets X coordinate for camera-x-
getCamLocYGets Y coordinate for camera-y-
getCamLocZGets Z coordinate for camera-z-
getCamTiltGets tilt for camera-tilt-
getCamUpVectorGets Up Vector for camera-vector [x,y,z]-
getCamUpVectorXGets X Up Vector for camera-x-
getCamUpVectorYGets Y Up Vector for camera---
getCamUpVectorZGets Z Up Vector for camera-z-
getControllerReturns the controller object-Controller-
getElementsReturn the array of a elements.-Elements-
getFOVGet field of view in non-orthographic projectionint; --
getFarGet far plane in non-orthographic projectionnumber; --
getGraphicsReturns the graphics implementation-Graphics-
getLightsGets lights-array of array-
getNameGet name for drawing panel-string-
getNearGet near plane in non-orthographic projectionnumber; --
getOrthographicWhether the projection is orthographic-boolean-
getPanelInteractionReturn panel interaction-panel interaction-
getProjectionGet the type of projection-type-
getSizeGet the sizes of the elements-double[]-
getSizeXGet the size along the X coordinate of the elements-double-
getSizeYGet the size along the Y coordinate of the elements-double-
getSizeZGet the size along the Z coordinate of the elements-double-
getStyleReturn the drawing style of the inner rectangle for panel-Style-
getWorldCoordinatesGets the preferred user coordinates for the panel-bounds-
getWorldXMaxReturns the preferred maximum X coordinate for the panel-double-
getWorldXMinReturns the preferred minimum X coordinate for the panel-double-
getWorldYMaxReturns the preferred maximum Y coordinate for the panel-double-
getWorldYMinReturns the preferred minimum Y coordinate for the panel-double-
getWorldZMaxReturns the preferred maximum Z coordinate for the panel-double-
getWorldZMinReturns the preferred minimum Z coordinate for the panel-double-
getZoomRateGets zoom rate-double-
indexOfElementReturn the position of a element.element Element; integer-
removeDecorationRemoves a decorationdrawable decoration element; --
removeElementRemove a element to the panel.element Element; --
renderRender the scene---
resetReset the scene---
setCamAltitudeSets altitude for cameraaltitude (degrees); --
setCamAzimuthSets azimuth for cameraazimuth (degrees); --
setCamFocusSets focus for cameravector [x,y,z]; --
setCamFocusXSets X focus for camerax; --
setCamFocusYSets Y focus for cameray; --
setCamFocusZSets Z focus for cameraz; --
setCamLocSets coordinates for cameravector [x,y,z]; --
setCamLocXSets X coordinate for camerax; --
setCamLocYSets Y coordinate for cameray; --
setCamLocZSets Z coordinate for cameraz; --
setCamTiltSets tilt for cameratilt (degrees); --
setCamUpVectorSets Up Vector for cameravector [x,y,z]; --
setCamUpVectorXSets X Up Vector for camerax; --
setCamUpVectorYSets Y Up Vector for cameray; --
setCamUpVectorZSets Z Up Vector for cameraz; --
setControllerSet the controllerController; --
setDecorationTypeSet visible a specific type of decorationtype "NONE", "AXES", "CUBE", "CENTERED_AXIS"; --
setDraggableHow the panel should respond to user interactiondraggable "NONE", "ANY", "AZIMUTH", "ALTITUDE"; --
setEnabledWhether the panel should respond to user interactionenabled boolean; --
setFOVSet field of view in non-orthographic projection-int-
setFarSet far plane in non-orthographic projection-number-
setGraphicsSet graphics (only Webgl supported)type; --
setLightsSet lightsarray of array; --
setNearSet near plane in non-orthographic projection-number-
setOrthographicSet orthographic projectionboolean; --
setProjectionSet the type of projection-type "PLANAR_XY", "PLANAR_XZ", "PLANAR_YZ", "PERSPECTIVE_OFF", "PERSPECTIVE_ON"-
setSizeSet the size of the elementsposition double[] an array of dimension 3 or an object with {x,y,z} properties; --
setSizeXSet the size along the X axis of the elementssizeX double; --
setSizeYSet the size along the Y axis of the elementssizeY double; --
setSizeZSet the size along the Z axis of the elementssizeZ double; --
setVisibleDecorationAxisSet visible decoration shown traditional axisboolean; --
setVisibleDecorationBasicAxisSet visible decoration shown basic axisboolean; --
setVisibleDecorationBoxSet visible decoration shown boxboolean; --
setWorldCoordinatesSets the preferred user coordinates for the panelbounds; --
setWorldXMaxSets the preferred maximum X coordinate for the panelxmax; --
setWorldXMinSets the preferred minimum X coordinate for the panelxmin; --
setWorldYMaxSets the preferred maximum Y coordinate for the panelymax; --
setWorldYMinSets the preferred minimum Y coordinate for the panelymin; --
setWorldZMaxSets the preferred maximum Z coordinate for the panelzmax; --
setWorldZMinSets the preferred minimum Y coordinate for the panelzmin; --
setZoomRateSets zoom ratedouble; --
supportsWebGLWhether webgl is supported-boolean-

EJSS_DRAWING3D.Element

ClassDescription
EJSS_DRAWING3D.ElementElement is the basic class for 3D elements


PropertyDescriptionTypeDefaultValues
EnabledPositionWhether the user could change the positionbooleanfalse-
EnabledSizeWhether the user could change the sizebooleanfalse-
MovesGroupWhether the group position also changes when the element position changesbooleanfalse-
ParentParent of the elementPanel|Group--
PositionCoordinates X, Y, and Zdouble[3][0,0,0]-
ResizesGroupWhether the group size also changes when the element size changesbooleanfalse-
SizeSize along the X, Y, and Z axesdouble[3][1,1,1]-
SizeXSize along the X axisdouble1-
SizeYSize along the Y axisdouble1-
SizeZSize along the Z axisdouble1-
XPosition in Xdouble0-
YPosition in Ydouble0-
ZPosition in Zdouble0-


MethodDescriptionParamsReturnVisibility
copyToCopies itself to another elementelement Element; --
getControllerReturns the controller object-Controller-
getGroupGet the group of this element, if any-Group-
getGroupPanelReturns the DrawingPanel in which it (or its final ancestor group) is displayed.-drawing3D.DrawingPanel-
getGroupTransformationGet the group transformation of the element.-Transformation-
getNameGet name for element-string-
getPanelFor internal use only, use getGroupPanel() instead. Gets the panel for this element.-DrawingPanel-
getParentGet the parent-parent Panel or Element-
getPositionGet the coordinates of the element-double[3]-
getSetIndexGet the index of this element in a set, if any-int-
getSizeGet the sizes of the element-double[]-
getSizeXGet the size along the X coordinate of the element-double-
getSizeYGet the size along the Y coordinate of the element-double-
getSizeZGet the size along the Z coordinate of the element-double-
getStyleReturn the style (defined in DrawingPanel.js) of the inner rectangle-boolean-
getTextureUrlGet texture url-url-
getTransformationGet the internal transformation of the element.-Transformation-
getXGet the X coordinate of the element-double-
getYGet the Y coordinate of the element-double-
getZGet the Z coordinate of the element-double-
isAlwaysUpdatedWhether element mesh must be always drawn-boolean-
isChangedWhether the element projection has changed-boolean-
isGroupChangedReturns whether the element group has changed.-boolean-
isGroupVisibleReturns the real visibility status of the element, which will be false if it belongs to an invisible group-boolean-
isMeasuredWhether the element is measured-boolean-
isVisibleWhether the element is visible-boolean-
registerPropertiesRegisters properties in a ControlElementcontroller A ControlElement that becomes the element controller; --
setAlwaysUpdatedTells whether element mesh must be always drawnalways boolean; --
setColorSet colorcolor; --
setControllerSet the controllerController; --
setGroupTo be used internally by Group only! Sets the group of this element.group Group; --
setMeasuredSets the measurability of the elementmeasured boolean; --
setMeshChangedTells the element mesh that it has changed. Typically used by subclasses when they change something.changed boolean; --
setPanelTo be used internally by DrawingPanel only! Sets the panel for this element.panel DrawingPanel; --
setParentSet the parentparent Panel or Element; --
setPositionSet the coordinates of the elementposition double[] an array of dimension 3; --
setProjChangedTells the element projection that it has changed. Typically used by subclasses when they change something.changed boolean; --
setSetTo be used internally by ElementSet only! Sets the index of this element in the setset ElementSet; index int; --
setSizeSet the size of the elementposition double[] an array of dimension 3 or an object with {x,y,z} properties; --
setSizeXSet the size along the X axis of the elementsizeX double; --
setSizeYSet the size along the Y axis of the elementsizeY double; --
setSizeZSet the size along the Z axis of the elementsizeZ double; --
setTextureUrlSet texture urlurl; --
setTransformationSets the internal transformation of the element.tr list of transformation arrays supports: rotation based on vector [angle, x, y, z, cx, cy, cz], rotation based on element center [angle, x, y, z], custom axes [x1, x2, x3, y1, y2, y3, z1, z2, z3] or full transformation with a matrix 4x4; --
setVisibleSets the visibility of the elementvisible boolean; --
setXSet the X coordinate of the elementx double; --
setYSet the Y coordinate of the elementy double; --
setZSet the Z coordinate of the elementz double; --

EJSS_DRAWING3D.ElementSet

ClassDescription
EJSS_DRAWING3D.ElementSetElementSet is the basic class for a set of Elements


PropertyDescriptionTypeDefaultValues
EnabledPositionWhether the user could change the positionbooleanfalse-
EnabledSizeWhether the user could change the sizebooleanfalse-
MovesGroupWhether the group position also changes when the element position changesbooleanfalse-
ResizesGroupWhether the group size also changes when the element size changesbooleanfalse-


EJSS_DRAWING3D.Sphere

ClassDescription
EJSS_DRAWING3D.SphereSphere


PropertyDescriptionTypeDefaultValues
RadiusRadiusnumber0.5-


TextArea

ClassDescription
TextAreaTextArea




MethodDescriptionParamsReturnVisibility
_addFontResizeListenerAdd a function to be called when the font size changeslistener a function to be called with possible the following parameters listener(iBase,iSize,iDelta); where: iBase the base font size in pixels iSize the current font size in pixels iDelta the change in pixels from the last size; --
_addOnBlurActionAdd a function to be called when the window in which the model runs looses focuslistener the function to be called; --
_addOnFocusActionAdd a function to be called when the window in which the model runs regains focuslistener the function to be called; --
_addOrientationChangeListenerAdd a function to be called when the view orientation changeslistener a function to be called with possible the following parameters listener(width,height); where: width the new inner width height the new inner height; --
_addResizeListenerAdd a function to be called when the view size changeslistener a function to be called with possible the following parameters listener(data); where: data.width is the new inner width data.height is the new inner height; --
_onBlurRun OnBlur Actions---
_onFocusRun OnFocus Actions---
_setInnerHTMLRun OnFocus Actions---
addTextAdd the text and scroll to the bottomvalue double; --
clearClear the text area---
setChangeColorOnEditWhether to change color onkeydown/onblurchange boolean; --