Class | Description |
---|---|
EJSS_DRAWING2D.Arrow | Arrow is a class to display vectors |
Parent |
---|
EJSS_DRAWING2D.Element |
Property | Description | Type | Default | Values |
---|---|---|---|---|
MarkEndOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
MarkMiddleOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
MarkStartOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
Class | Description |
---|---|
EJSS_DRAWING2D.ArrowSet | ArrowSet is a set of Arrows |
Property | Description | Type | Default | Values |
---|---|---|---|---|
MarkEndOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
MarkMiddleOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
MarkStartOrient | Orientation of the marker. Values are "auto" or the angle to rotate the marker | int|String | "auto" | - |
Class | Description |
---|---|
EJSS_DRAWING2D.Axis | An Axis is the 2D drawable used by PlottingPanels as decoration |
Parent |
---|
EJSS_DRAWING2D.Segment |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
getAutoTicks | - | - | - | - |
setAutoTicks | - | auto; | - | - |
Class | Description |
---|---|
EJSS_DRAWING2D.Custom | A Custom element is a 2D drawing element that executes a user function for drawing |
Parent |
---|
EJSS_DRAWING2D.Element |
Class | Description |
---|---|
EJSS_DRAWING2D.DrawingPanel | A DrawingPanel is a 2D drawing panel with no decoration. |
Property | Description | Type | Default | Values |
---|---|---|---|---|
AutoScaleX | Whether the panel should autoscale in the X dimension | boolean | "false" | - |
AutoScaleY | Whether the panel should autoscale in the Y dimension | boolean | "false" | - |
Background | The 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" | - |
CSS | An object with one or more CSS properties. Example { "background-color" : "red", "float" : "right" } | Object | "inline" | - |
ClassName | A classname for the element that can be used in CSS files | String | "undefined" | - |
CursorTypeForMove | The type of cursor when an element is moved. See this link for possible values. | String | "move" | - |
Display | The CSS display property of the element See this link for possible values. | string | "inline" | - |
DrawFill | Whether to fill the main drawing area of the panel. | boolean | "true" | - |
DrawLines | Whether to draw the inner border of the panel (inside border of the gutter). | boolean | "true" | - |
Enabled | Whether the panel should respond to user interaction. This is set to "false" by default, since 'listening' to interaction slows down the rendering. | boolean | "false" | - |
FillColor | The 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" | - |
Foreground | The 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" | - |
GraphicsMode | The 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:
| "SCALE_NUM" | - |
Gutters | The dimensions of a strip around the main panel drawing area | int[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" | - |
GuttersColor | The 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" | - |
GuttersDrawLines | Whether to draw the outer border of the panel (exterior border of the gutter). | boolean | "true" | - |
GuttersFill | Whether to fill the gutter. | boolean | "true" | - |
GuttersLineColor | The 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" | - |
GuttersLineWidth | The stroke width for the outer border of the panel (exterior border of the gutter). | int width in pixels | "1" | - |
GuttersRendering | SVG shape rendering for the gutters | string | "auto" | "auto","optimizeSpeed","crispEdges","geometricPrecision" |
Height | The height of the HTML5 element. See this link for possible values. | int or String | "auto" | - |
LineColor | The 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" | - |
LineWidth | The stroke width for the border of the main drawing area of the panel (inner border of the gutters). | int width in pixels | "1" | - |
MarginX | When autoscaling the X axis, the percentage of the X range that should be left (on both sides) around the elements | int or double (in the range [0,100]) | "0" | - |
MarginY | When autoscaling the Y axis, the percentage of the Y range that should be left (on both sides) around the elements | int or double (in the range [0,100]) | "0" | - |
MaximumX | The 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" | - |
MaximumXY | The 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" | - |
MinimumX | The 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" | - |
MinimumY | The 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" | - |
ScaleXType | The type of scale for the X axis | int or String. One of:
| "SCALE_NUM" | - |
ScaleYType | The type of scale for the Y axis | int or String. One of:
| "SCALE_NUM" | - |
SquareAspect | Whether the panel should modify its scales to keep a 1:1 aspect ratio. | boolean | "false" | - |
StopEventPropagation | Whether 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" | - |
StopMoveEvents | Whether to enable the move event listener. This is set to "false" by default and is ignored when Enabled is set to "false". | boolean | "false" | - |
Visibility | Whether the element is visible | boolean | true | - |
Width | The width of the HTML5 element. See this link for possible values. | int or String | "auto" | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
addDecoration | Adds a decoration to the panel. Decorations are drawn before any other elements. | drawable decoration element; position integer; istop top decoration; | - | - |
addElement | Add 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; | - | - |
checkMeasure | Recalculate world dimensions using measure elements | - | boolean whether dimesions update | - |
disable | Disable rendering | - | - | - |
enable | Enable rendering | - | - | - |
getAutoScale | Get auto-scale | - | boolean | - |
getAutoScaleX | Get auto-scale in X | - | boolean | - |
getAutoScaleY | Get auto-scale in Y | - | boolean | - |
getController | Returns the controller object | - | Controller | - |
getElements | Return the array of a elements. | - | Elements | - |
getEnabledDragging | Type of motion allowed to drag panel | - | motion | - |
getEnabledZooming | Whether panal scaling is allowed | - | boolean | - |
getGraphics | Returns the graphics implementation | - | Graphics | - |
getGraphicsMode | Get the graphics mode | - | One of the possible graphics implementation mode: EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_SVG or EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_CANVAS | - |
getGraphicsModeName | Get the graphics mode | - | The implementation mode as a string: either "SVG" or "CANVAS" | - |
getGutters | Return the bounding gutters | - | Gutters | - |
getGuttersStyle | Return the drawing style of the bounding gutters | - | Style | - |
getInnerRect | Return drawing box (excluding gutters) | - | box | - |
getInvertedScaleY | Get inverted scale in Y | - | boolean | - |
getMarginX | Get margin X | - | margin | - |
getMarginY | Get margin Y | - | margin | - |
getMeasuredCoordinates | Gets the measured coordinates for the panel | - | bounds | - |
getName | Get name for drawing panel | - | string | - |
getPanelInteraction | Return Panel Interaction | panel interaction; | - | - |
getPixelPositionWorldOrigin | Get pixel position of the origin | - | array pixel position | - |
getRealWorldCoordinates | Gets the user coordinates for the panel | - | bounds | - |
getRealWorldXMax | Returns the maximum X coordinate for the panel | - | double | - |
getRealWorldXMin | Returns the minimum X coordinate for the panel | - | double | - |
getRealWorldYMax | Returns the maximum Y coordinate for the panel | - | double | - |
getRealWorldYMin | Returns the minimum Y coordinate for the panel | - | double | - |
getShowAreaRectangle | Show area rectangle in panel | boolean; | - | - |
getShowCoordinates | Whether coordinates in panel are showed | - | boolean | - |
getStyle | Return the drawing style of the inner rectangle for panel | - | Style | - |
getTypeScaleX | Get type of scale in X | - | int | - |
getTypeScaleY | Get type of scale in Y | - | int | - |
getWorldCoordinates | Gets the preferred user coordinates for the panel | - | bounds | - |
getWorldXMax | Returns the preferred maximum X coordinate for the panel | - | double | - |
getWorldXMin | Returns the preferred minimum X coordinate for the panel | - | double | - |
getWorldYMax | Returns the preferred maximum Y coordinate for the panel | - | double | - |
getWorldYMin | Returns the preferred minimum Y coordinate for the panel | - | double | - |
getZoomLimits | Get zoom limits | - | limits [min,max] | - |
getZoomRate | Get zoom rate | - | rate | - |
importGraphics | Returns the svg image in Base64 format | callback; | string | - |
indexOfElement | Return the position of a element. | element Element; | integer | - |
recomputeScales | Recomputes the scales of the panel. | - | - | - |
removeDecoration | Removes a decoration | drawable decoration element; | - | - |
removeElement | Remove a element to the panel. | element Element; | - | - |
render | Render the scene | - | - | - |
reportDecorations | Report event to decoration elements | event; | - | - |
reset | Reset the scene | - | - | - |
scale | Force scale again | - | - | - |
serialize | Get JSON object with private variables | - | - | private |
setAutoScale | Set auto-scale | auto; | - | - |
setAutoScaleX | Set auto-scale in X | auto; | - | - |
setAutoScaleY | Set auto-scale in Y | auto; | - | - |
setController | Set the controller | Controller; | - | - |
setEnabledDragging | Allow to drag panel | - | - | - |
setEnabledZooming | Allow to scale panel | allowed; | - | - |
setGraphicsMode | Set graphics | mode One of the possible graphics implementation mode: EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_SVG or EJSS_DRAWING2D.DrawingPanel.GRAPHICS2D_CANVAS. Or simply "CANVAS" or "SVG"; | - | - |
setGutters | Sets the gutters dimensions | rect the number of pixels for the drawing area; | - | - |
setInvertedScaleY | Set inverted scale in Y | inverted; | - | - |
setMarginX | Set margin X | margin; | - | - |
setMarginY | Set margin Y | margin; | - | - |
setShowAreaRectangle | Show area rectangle in panel | boolean; | - | - |
setShowCoordinates | Show coordinates in panel | boolean; | - | - |
setSquareAspect | Whether the panel should keep a 1:1 aspect ratio between X and Y coordinates | boolean; | - | - |
setTypeScaleX | Set type of scale in X | type; | - | - |
setTypeScaleY | Set type of scale in Y | type; | - | - |
setWorldCoordinates | Sets the preferred user coordinates for the panel | bounds; | - | - |
setWorldXMax | Sets the preferred maximum X coordinate for the panel | xmax; | - | - |
setWorldXMin | Sets the preferred minimum X coordinate for the panel | xmin; | - | - |
setWorldYMax | Sets the preferred maximum Y coordinate for the panel | ymax; | - | - |
setWorldYMin | Sets the preferred minimum Y coordinate for the panel | ymin; | - | - |
setZoomLimits | Set zoom limits | limits [min,max]; | - | - |
setZoomRate | Set zoom rate | rate; | - | - |
toPanelLogScale | Projects a value in pixel coordinates from a decimal scale (defined by origin, min, max and pixratio) to a log scale in world coordinates | value 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 | - |
toPanelMod | To be used only after a call to render()! Projects a module from pixel coordinates to world coordinates | point double[] The original module; | double[] The same array once transformed | - |
toPanelPosition | To be used only after a call to render()! Projects a point from pixel coordinates to world coordinates | point double[] The original coordinates; scale double[] The type of scale (LOG or NUM); | double[] The same array once transformed | - |
toPixelAxisX | Converts a X pixel value so that 0 is at the left | x double; | - | - |
toPixelAxisY | Converts a Y pixel value so that 0 is at the bottom | y double; | - | - |
toPixelLogScale | Projects a value in world coordinates from a decimal scale (defined by origin, min, max and pixratio) to a log scale in pixel coordinates | value 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 | - |
toPixelMod | To be used only after a call to render()! Projects a module from world coordinates to pixel coordinates | point double[] The original module; | double[] The same array once transformed | - |
toPixelPosition | To 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 | - |
touch | Refresh all elements | - | - | - |
unserialize | Set JSON object with private variables | - | - | private |
Class | Description |
---|---|
EJSS_DRAWING2D.Element | Basic Element 2D |
Property | Description | Type | Default | Values |
---|---|---|---|---|
Attributes | Inline SVG attributtes | object | - | {nameAttr1:value1,nameAttr2:value2,..} |
Bounds | Position of the bounding box of the element | Object{left,rigth,top,bottom} | - | - |
Diameter | Diameter, i.e. the value of the width and the height | double | - | - |
DrawFill | Whether the fill color is drawed | boolean | true | - |
DrawLines | Whether the stroke is drawed | boolean | true | - |
EnabledPosition | Whether the user could change the position | boolean | false | - |
EnabledSize | Whether the user could change the size | boolean | false | - |
FillColor | Fill color | string | "none" | - |
LineColor | Stroke color | string | "Black" | - |
LineWidth | Stroke width | double | 0.5 | - |
Measured | Measurability of the element | boolean | true | - |
MovesGroup | Whether the group position also changes when the element position changes | boolean | false | - |
Parent | Parent of the element | Panel|Group | - | - |
PixelPosition | Whether the position is in pixels | boolean | false | - |
PixelSize | Whether the size is in pixels | boolean | false | - |
Position | Coordinates X and Y | double[2] | [0,0] | - |
Radius | Radius, i.e. the half of the diameter | double | - | - |
RelativePosition | Position of the coordinates X and Y relative to the element | string|int | "CENTER" | "CENTER":0,"NORTH":1,"SOUTH":2,"EAST":3,"WEST":4,"NORTH_EAST":5,"NORTH_WEST":6, "SOUTH_EAST":7,"SOUTH_WEST":8 |
ResizesGroup | Whether the group size also changes when the element size changes | boolean | false | - |
Rotate | Rotation of the element | int | 0 | int:angle in radians to rotate the element with origin its position |
ScaleX | Scale transformation of the element in X | float | 1 | float: scale in X |
ScaleY | Scale transformation of the element in Y | float | 1 | float: scale in Y |
Sensitivity | Sensitivity in pixels when the user touchs the element | int | 20 | - |
ShapeRendering | SVG shape rendering | string | "auto" | "auto","optimizeSpeed","crispEdges","geometricPrecision" |
Size | Size along the X and Y axes | double[2] | [1,1] | - |
SizeX | Size along the X axis | double | 1 | - |
SizeY | Size along the Y axis | double | 1 | - |
SkewX | Skew transformation of the element in X | float | 1 | float: skew angle in X |
SkewY | Skew transformation of the element in Y | float | 1 | float: skew angle in Y |
Transformation | Internal transformation of the element | int|float[6]|string | 0 | int:angle in radians to rotate the element with origin its position, float[9]: transformation matrix - [scaleX, skewY, skewX, scaleY, translateX, translateY] |
Visibility | Whether the element is visible | boolean | true | - |
X | Position in X | double | 0 | - |
Y | Position in Y | double | 0 | - |
Action | Description |
---|---|
OnDoubleClick | Event when double click |
OnDrag | Event when the mouse drags the element |
OnEnter | Event when the mouse enters in the element |
OnExit | Event when the mouse exits the element |
OnPress | Event when the mouse clicks over the element |
OnRelease | Event when the mouse release the element |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
copyTo | Copies itself to another element | element Element; | - | private |
getAbsoluteBounds | Returns 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 |
getAbsolutePosition | Returns 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 |
getAbsoluteSize | Returns the absolute world sizes in the panel (after applying groups) | - | double[2] | private |
getBounds | Returns bounds for an element | - | Object{left,rigth,top,bottom} | public |
getController | Returns the controller object | - | Controller | private |
getCustomObject | Retrieve an object for internal use | - | Object | protected |
getGroup | Get the group of this element, if any | - | Group | private |
getGroupPanel | Returns the DrawingPanel in which it (or its final ancestor group) is displayed | - | DrawingPanel | private |
getInfo | Gets information for element | - | string | private |
getInteractionTarget | Returns array of the interaction targets defined by the element | - | targets | private |
getName | Gets name for element | - | string | public |
getPanel | Gets the panel for this element | - | DrawingPanel | private |
getParent | Gets the property Parent | - | Panel|Group | public |
getPixelPosition | Returns pixel coordinates | withTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); | double[2] | private |
getPixelPositionOf | Returns pixel coordinates for the given point in the element's world coordinates | withTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); | double[2] | private |
getPixelSizeOf | Returns pixel sizes for the given sizes in the element's world coordinates | - | double[2] | private |
getPixelSizes | Returns pixel sizes | withTransf whether transformation must be considered, note it will be false (or undefinded) when transformations are applied by svg (drawing); | double[2] | private |
getPosition | Gets the property Position | - | double[2] | public |
getRotate | Gets the property Rotate | - | Rotate angle | public |
getScaleX | Gets the property ScaleX | - | scale rate | public |
getScaleY | Gets the property ScaleY | - | scale rate | public |
getSet | Gets the set of this element, if any | - | ElementSet | private |
getSetIndex | Gets the index of this element in a set, if any | - | int | private |
getSize | Gets the property Size | - | double[] | public |
getSizeX | Gets the property SizeX | - | double | public |
getSizeY | Gets the property SizeY | - | double | public |
getSkewX | Gets the property SkewX | - | skew angle | public |
getSkewY | Gets the property SkewY | - | skew angle | public |
getStyle | Return the style associated to the element | - | Style | public |
getTransformation | Gets the property Transformation | - | Transformation - [scaleX, skewY, skewX, scaleY, translateX, translateY] | public |
getX() | Gets the property X | - | double | public |
getY() | Gets the property Y | - | double | public |
isChanged | Whether the element has changed | - | boolean | private |
isGroup | Is the element a group | - | boolean | public |
isGroupChanged | Returns whether the element group has changed | - | boolean | private |
isGroupVisible | Returns the real visibility status of the element, which will be false if it belongs to an invisible group | - | boolean | public |
isMeasured | Gets the property Measured | - | boolean | public |
isMustProject | Whether the element needs to project. Typically used by the dawing panel whenever it changes its scales | - | boolean | private |
isPixelPosition | Returns the property PixelPosition | - | boolean | public |
isPixelSize | Gets the property PixelSize | - | boolean | public |
isVisible | Gets the property Visibility | - | boolean | public |
registerProperties | Registers properties in a ControlElement | controller A ControlElement that becomes the element controller; | - | private |
serialize | Get JSON object with private variables | - | - | private |
setAbsolutePosition | Sets 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 |
setAbsoluteX | Sets 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 | - | double | private |
setAbsoluteY | Sets 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 | - | double | private |
setBounds | Sets bounds for an element | Object{left,rigth,top,bottom}|[left,rigth,top,bottom]; | - | public |
setChanged | Tells the element that it has changed Typically used by subclasses when they change something. | changed boolean; | - | private |
setController | Sets the controller | Controller; | - | private |
setCustomObject | Store an object for internal use | - | - | protected |
setGroup | Sets the group of this element | group Group; | - | private |
setMeasured | Sets the property Measured | measured boolean; | - | public |
setMustProject | Tells 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 already | needsIt boolean; | - | private |
setPanel | Sets the panel for this element | panel DrawingPanel; | - | private |
setParent | Sets the property Parent | parent Panel or Group; | - | public |
setPixelPosition | Sets the property PixelPosition | pixel boolean; | - | public |
setPixelSize | Sets the property PixelSize | pixel boolean; | - | public |
setPosition | Sets the property Position | position double[2]; | - | public |
setRotate | Sets the property Rotate | Rotate angle; | - | public |
setScaleX | Sets the property ScaleX | scale rate; | - | public |
setScaleY | Sets the property ScaleY | scale rate; | - | public |
setSet | Sets the index of this element in the set | set ElementSet; index int; | - | private |
setSize | Sets the property Size | position double[2]; | - | public |
setSizeX | Sets the property SizeX | sizeX double; | - | public |
setSizeY | Sets the property SizeY | sizeY double; | - | public |
setSkewX | Sets the property SkewX | skew angle; | - | public |
setSkewY | Sets the property SkewY | skew angle; | - | public |
setTransformation | Sets the property Transformation | trans transformation - [scaleX, skewY, skewX, scaleY, translateX, translateY]; | - | public |
setVisible | Sets the property Visibility | visible boolean; | - | public |
setX(x) | Sets the property X | x double; | - | public |
setY(y) | Sets the property Y | y double; | - | public |
toElementSpace | Transforms 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 translated | private |
toGroupSpace | Transforms a double[] point in the element's world coordinates to the group's world coordinates | point double[] The original coordinates in the body frame; withTransf bool Considering group transformations; | double[] The same array once transformed | private |
toGroupSpaceMod | Transforms a module (longitude or size) in the element's world coordinates to the group's world coordinates | mod double[] The original module in the body frame; | double[] The same array once transformed | private |
unserialize | Set JSON object with private variables | - | - | private |
Class | Description |
---|---|
EJSS_DRAWING2D.Histogram | A Histogram displays a diagram of frequencies of data |
Parent |
---|
EJSS_DRAWING2D.Element |
Property | Description | Type | Default | Values |
---|---|---|---|---|
Active | Whether the histogram actually accepts input values | boolean | true | - |
BinWidth | The 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 bin | int or double | 1 | - |
ClearAtInput | Whether to clear old data whenever new data gets in | boolean | false | - |
Discrete | Whether 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 bin | boolean | false | - |
FixBin | Fix bin in the input | double | 0 | - |
Normalized | Whether the data are normalized to one | boolean | false | - |
Occurrences | The number of the occurrences of the input | int or double | 1 | - |
PixelPosition | The input value to append | double or double[] | false | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
getBigMark | Gets the interval for big marks | - | int | public |
getMediumMark | Gets the interval for medium marks | - | value int | public |
getNumberOfMarks | Gets the number of marks | - | int | public |
getPrecision | Gets the number of digits for the marks | - | int | public |
setBigMark(value) | Sets the interval for big marks | value int; | - | public |
setDigits(value) | Sets the number of digits for the marks | value int; | - | public |
setMediumMark(value) | Sets the interval for medium marks | value int; | - | public |
setNumberOfMarks(value) | Sets the number of marks | value int; | - | public |
Class | Description |
---|---|
EJSS_DRAWING2D.PlottingPanel | A PlottingPanel is a 2D drawing panel with added decoration. The decoration includes axes, gutters and titles. |
Parent |
---|
EJSS_DRAWING2D.DrawingPanel |
Property | Description | Type | Default | Values |
---|---|---|---|---|
Title | The title at the top center of the panel | String | "Plot" | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
getAxisX() | - | - | the axis element for the X dimension | public |
getAxisY() | - | - | the axis element for the Y dimension | public |
getBigMark | Gets the interval for big marks | - | int | public |
getMarkFactor | Gets the factor that divide the displayed value in marks | - | int|double | public |
getMaximumMark | Gets the maximum value to display in a mark | - | value int|double | public |
getMediumMark | Gets the interval for medium marks | - | int | public |
getNumberOfMarks | Gets the number of marks | - | int | public |
getPrecision | Gets the number of digits for the marks | - | int | public |
setBigMark(value) | Sets the interval for big marks | value int; | - | public |
setDigits(value) | Sets the number of digits for the marks | value int; | - | public |
setMarkFactor(value) | Sets the factor that divide the value in marks | value int|double; | - | public |
setMaximumMark(value) | Sets the maximum value to display in a mark | value int|double; | - | public |
setMediumMark(value) | Sets the interval for medium marks | value int; | - | public |
setNumberOfMarks(value) | Sets the number of marks | value int; | - | public |
Class | Description |
---|---|
EJSS_DRAWING2D.Segment | A Segment is a 2D drawing element that displays a single line |
Parent |
---|
EJSS_DRAWING2D.Element |
Class | Description |
---|---|
EJSS_DRAWING2D.Shape | A Shape is a 2D drawing element that displays a 2D shape (such as a rectangle, ellipse, etc.) |
Parent |
---|
EJSS_DRAWING2D.Element |
Property | Description | Type | Default | Values |
---|---|---|---|---|
CornerRadius | Radius for the corners of a round rectangular shape | int | 10 | - |
FillColor | - | - | "Blue" | - |
LineColor | - | - | "Black" | - |
RelativePosition | - | - | "CENTER" | - |
ShapeType | Type of shape | int|String | "ELLIPSE" | 0:"NONE", 1:"ELLIPSE", 2:"RECTANGLE", 3:"ROUND_RECTANGLE", 4:"WHEEL", 5:"POINT" |
Size | - | - | [0.1,0.1] | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
copyTo | Extended copyTo method | Element; | - | private |
getClass | Returns the class name | - | String | private |
getCornerRadius | Gets the value of the property CornerRadius | - | int | - |
getShapeType | Gets the value of the property ShapeType | - | int|String | public |
registerProperties | Extended registerProperties method | controller; | - | private |
setCornerRadius | Sets the value of the property CornerRadius | radius int; | - | - |
setShapeType(shapeType) | Sets the value of the property ShapeType | shapeType int|String; | - | public |
Class | Description |
---|---|
EJSS_DRAWING2D.SimplePanel | A SimplePanel is a 2D drawing panel with no decoration. |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
setRadius | Set radius | radius; | - | - |
Class | Description |
---|---|
EJSS_DRAWING2D.Text | A Text is a 2D drawing element that displays a text |
Parent |
---|
EJSS_DRAWING2D.Element |
Property | Description | Type | Default | Values |
---|---|---|---|---|
FillColor | Fill color | String | "none" | - |
Font | Font description in one declaration | String - https://www.w3schools.com/cssref/pr_font_font.asp | "20px Arial" | - |
FontFamily | Font family | String | "Arial" | - |
FontSize | Font size | String | "20" | - |
FontStyle | Font style | String | "normal" | - |
OutlineColor | Outline color | String | "none" | - |
Text | Text | String | "" | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
getText | Gets text | - | string | public |
setText | Sets text | string; | - | public |
Class | Description |
---|---|
EJSS_DRAWING2D.Trace | A 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 |
Property | Description | Type | Default | Values |
---|---|---|---|---|
MarkAxisY | Axis for bar or area markers | int | 0 | - |
MarkDrawFill | Whether the marker are filled | boolean | true | - |
MarkDrawLines | Whether the marker lines are drawn | boolean | true | - |
MarkFillColor | The fill color for the markers | String | "Blue" | - |
MarkLineColor | Color for the lines of the markers | String | "Black" | - |
MarkLineWidth | Marker stroke width | double | 0.5 | - |
MarkRelativePosition | Position of the marker relative to the point | int|String | "CENTER | "CENTER":0,"NORTH":1,"SOUTH":2,"EAST":3,"WEST":4,"NORTH_EAST":5,"NORTH_WEST":6, "SOUTH_EAST":7,"SOUTH_WEST":8 |
MarkSize | Size of the marker to draw | int[2] providing the width and height in pixels | [0,0] | - |
MarkType | Type of marker to draw | int|String | "ELLIPSE" | 0="ELLIPSE", 1="RECTANGLE", 2:"AREA", 3:"BAR" |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
getMarkAxisY() | Get the limit axis for bar or area marks | - | int | public |
getMarkSize() | Get the sizes of the mark | - | double[] | public |
getMarkStyle() | Return the style of the mark | - | - | public |
getMarkStyleList() | Get the list of styles | - | list | public |
getMarkType() | Get the type of the mark | - | int | public |
setMarkAxisY() | Set the limit axis for bar or area marks | int; | - | public |
setMarkSize(size) | Set the size of the mark | size int[2]|double[2] array with the size in pixels; | - | public |
setMarkType(type) | Set the type of the mark | type 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 |
Class | Description |
---|---|
EJSS_DRAWING2D.Trail | A 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 |
Property | Description | Type | Default | Values |
---|---|---|---|---|
Active | Whether the trail should accept input points. | boolean | true | - |
ClearAtInput | Whether the trail clears all points when receiving new input. (Useful if input is an array.) | boolean | false | - |
Connected | Whether the next input point should be connected to the previous one. | boolean | true | - |
Input | The 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" | - |
InputX | The 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" | - |
InputY | The 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" | - |
Maximum | The maximum number of points the trail accepts. If more input is received, the trail will discard the corresponding first points. | int | 0 indicating no limit | - |
NoRepeat | Whether the trail ignores repeated input points | boolean | false | - |
RelativePosition | - | - | "SOUTH_WEST" | - |
Skip | Whether 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. | int | 0 | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
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. | - | boolean | public |
getConnected() | Gets the connection state. | - | boolean | public |
getMaximumPoints() | Returns the maximum number of points allowed for the trail | - | int | public |
getNoRepeat() | Whether the trail is in no repeat mode. | - | boolean | - |
getSkip() | Returns the skip parameter of the trail. | - | int | public |
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 |
serialize | Get 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 one | connected 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 |
unserialize | Set JSON object with private variables | - | - | private |
Class | Description |
---|---|
EJSS_DRAWING3D.Arrow | Arrow is a class to display vectors in 3D |
Property | Description | Type | Default | Values |
---|---|---|---|---|
HeadHeight | Ratio arrow_length/head_length | double | "8" | - |
HeadWidth | Ratio arrow_length/head_width | double | "20" | - |
Class | Description |
---|---|
EJSS_DRAWING3D.ArrowSet | ArrowSet is a set of Arrows |
Property | Description | Type | Default | Values |
---|---|---|---|---|
HeadHeight | Ratio arrow_length/head_length | double | "8" | - |
HeadWidth | Ratio arrow_length/head_width | double | "20" | - |
Class | Description |
---|---|
EJSS_DRAWING3D.Cylinder | Cylinder |
Property | Description | Type | Default | Values |
---|---|---|---|---|
BottomRadius | Bottom radius | number | 1 | - |
MaxAngleU | Maximum angle in drawing | number | 360 | - |
MinAngleU | Minimum angle in drawing | number | 0 | - |
TopRadius | Top radius | number | 1 | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
setOriginAndEnd | Changes the position and Size Z and adds an extra transformation so that the axis of the element has the prescribed origin and end points | origin a double[3] array with the origin of the axis; end a double[3] array with the end point of the axis; | - | - |
Class | Description |
---|---|
EJSS_DRAWING3D.Disk | Disk |
Class | Description |
---|---|
EJSS_DRAWING3D.DrawingPanel | A DrawingPanel is a 3D drawing panel. |
Property | Description | Type | Default | Values |
---|---|---|---|---|
CameraAltitude | Camera rotation in Y axis. | int or double (degrees) | 0 | - |
CameraAzimuth | Camera rotation in Z axis. | int or double (degrees) | 0 | - |
CameraFar | Far plane in 3D projection. | int | 10000 | - |
CameraFocusX | Camera focus in X axis. | int or double | 0 | - |
CameraFocusY | Camera focus in Y axis. | int or double | 0 | - |
CameraFocusZ | Camera focus in Z axis. | int or double | 0 | - |
CameraNear | Near plane in 3D projection. | int | 1 | - |
CameraTilt | Camera rotation in X axis. | int or double (degrees) | 0 | - |
CameraUpVectorX | Camera up vector in X axis. | int or double | 0 | - |
CameraUpVectorY | Camera up vector in Y axis. | int or double | 0 | - |
CameraUpVectorZ | Camera up vector in Z axis. | int or double | 0 | - |
CameraX | Camera position in X axis. | int or double | 4 | - |
CameraY | Camera position in Y axis. | int or double | 0 | - |
CameraZ | Camera position in Z axis. | int or double | 0 | - |
CameraZoomRate | Camera zoom rate. | int or double | 1.10 | - |
Lights | Lights in scene. | array of array | [[1,2,3]] | - |
MaximumX | The maximum value for the X coordinates of elements. | int or double | "+1" | - |
MaximumY | The maximum value for the Y coordinates of elements. | int or double | "+1" | - |
MaximumZ | The maximum value for the Z coordinates of elements. | int or double | "+1" | - |
MinimumX | The minimum value for the X coordinates of elements. | int or double | "-1" | - |
MinimumY | The minimum value for the Y coordinates of elements. | int or double | "-1" | - |
MinimumZ | The minimum value for the Z coordinates of elements. | int or double | "-1" | - |
Perspective | Field of view when perspective on. A parameter that gives more or less perspective to the projection. | int (degrees) | "45" | - |
Projection | Type of projection. | int or string | "PERSPECTIVE_ON" | "PLANAR_XY": 0; "PLANAR_XZ": 1; "PLANAR_YZ": 2; "PERSPECTIVE_OFF": 3; "PERSPECTIVE_ON": 4; |
SizeX | Size for the X axis. | int or double | 1 | - |
SizeY | Size for the Y axis. | int or double | 1 | - |
SizeZ | Size for the Z axis. | int or double | 1 | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
addDecoration | Adds a decoration to the panel. Decorations are drawn before any other elements. | drawable decoration element; position integer; | - | - |
addElement | Add 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; | - | - |
getAutoCamera | Gets auto camera | - | boolean | - |
getCamAltitude | Gets altitude for camera | - | altitude | - |
getCamAzimuth | Gets azimuth for camera | - | azimuth | - |
getCamFocus | Gets focus for camera | - | vector | - |
getCamFocusX | Gets X focus for camera | - | x | - |
getCamFocusY | Gets Y focus for camera | - | y | - |
getCamFocusZ | Gets Z focus for camera | - | z | - |
getCamLoc | Gets coordinates for camera | - | vector | - |
getCamLocX | Gets X coordinate for camera | - | x | - |
getCamLocY | Gets Y coordinate for camera | - | y | - |
getCamLocZ | Gets Z coordinate for camera | - | z | - |
getCamTilt | Gets tilt for camera | - | tilt | - |
getCamUpVector | Gets Up Vector for camera | - | vector [x,y,z] | - |
getCamUpVectorX | Gets X Up Vector for camera | - | x | - |
getCamUpVectorY | Gets Y Up Vector for camera | - | - | - |
getCamUpVectorZ | Gets Z Up Vector for camera | - | z | - |
getController | Returns the controller object | - | Controller | - |
getElements | Return the array of a elements. | - | Elements | - |
getFOV | Get field of view in non-orthographic projection | int; | - | - |
getFar | Get far plane in non-orthographic projection | number; | - | - |
getGraphics | Returns the graphics implementation | - | Graphics | - |
getLights | Gets lights | - | array of array | - |
getName | Get name for drawing panel | - | string | - |
getNear | Get near plane in non-orthographic projection | number; | - | - |
getOrthographic | Whether the projection is orthographic | - | boolean | - |
getPanelInteraction | Return panel interaction | - | panel interaction | - |
getProjection | Get the type of projection | - | type | - |
getSize | Get the sizes of the elements | - | double[] | - |
getSizeX | Get the size along the X coordinate of the elements | - | double | - |
getSizeY | Get the size along the Y coordinate of the elements | - | double | - |
getSizeZ | Get the size along the Z coordinate of the elements | - | double | - |
getStyle | Return the drawing style of the inner rectangle for panel | - | Style | - |
getWorldCoordinates | Gets the preferred user coordinates for the panel | - | bounds | - |
getWorldXMax | Returns the preferred maximum X coordinate for the panel | - | double | - |
getWorldXMin | Returns the preferred minimum X coordinate for the panel | - | double | - |
getWorldYMax | Returns the preferred maximum Y coordinate for the panel | - | double | - |
getWorldYMin | Returns the preferred minimum Y coordinate for the panel | - | double | - |
getWorldZMax | Returns the preferred maximum Z coordinate for the panel | - | double | - |
getWorldZMin | Returns the preferred minimum Z coordinate for the panel | - | double | - |
getZoomRate | Gets zoom rate | - | double | - |
indexOfElement | Return the position of a element. | element Element; | integer | - |
removeDecoration | Removes a decoration | drawable decoration element; | - | - |
removeElement | Remove a element to the panel. | element Element; | - | - |
render | Render the scene | - | - | - |
reset | Reset the scene | - | - | - |
setCamAltitude | Sets altitude for camera | altitude (degrees); | - | - |
setCamAzimuth | Sets azimuth for camera | azimuth (degrees); | - | - |
setCamFocus | Sets focus for camera | vector [x,y,z]; | - | - |
setCamFocusX | Sets X focus for camera | x; | - | - |
setCamFocusY | Sets Y focus for camera | y; | - | - |
setCamFocusZ | Sets Z focus for camera | z; | - | - |
setCamLoc | Sets coordinates for camera | vector [x,y,z]; | - | - |
setCamLocX | Sets X coordinate for camera | x; | - | - |
setCamLocY | Sets Y coordinate for camera | y; | - | - |
setCamLocZ | Sets Z coordinate for camera | z; | - | - |
setCamTilt | Sets tilt for camera | tilt (degrees); | - | - |
setCamUpVector | Sets Up Vector for camera | vector [x,y,z]; | - | - |
setCamUpVectorX | Sets X Up Vector for camera | x; | - | - |
setCamUpVectorY | Sets Y Up Vector for camera | y; | - | - |
setCamUpVectorZ | Sets Z Up Vector for camera | z; | - | - |
setController | Set the controller | Controller; | - | - |
setDecorationType | Set visible a specific type of decoration | type "NONE", "AXES", "CUBE", "CENTERED_AXIS"; | - | - |
setDraggable | How the panel should respond to user interaction | draggable "NONE", "ANY", "AZIMUTH", "ALTITUDE"; | - | - |
setEnabled | Whether the panel should respond to user interaction | enabled boolean; | - | - |
setFOV | Set field of view in non-orthographic projection | - | int | - |
setFar | Set far plane in non-orthographic projection | - | number | - |
setGraphics | Set graphics (only Webgl supported) | type; | - | - |
setLights | Set lights | array of array; | - | - |
setNear | Set near plane in non-orthographic projection | - | number | - |
setOrthographic | Set orthographic projection | boolean; | - | - |
setProjection | Set the type of projection | - | type "PLANAR_XY", "PLANAR_XZ", "PLANAR_YZ", "PERSPECTIVE_OFF", "PERSPECTIVE_ON" | - |
setSize | Set the size of the elements | position double[] an array of dimension 3 or an object with {x,y,z} properties; | - | - |
setSizeX | Set the size along the X axis of the elements | sizeX double; | - | - |
setSizeY | Set the size along the Y axis of the elements | sizeY double; | - | - |
setSizeZ | Set the size along the Z axis of the elements | sizeZ double; | - | - |
setVisibleDecorationAxis | Set visible decoration shown traditional axis | boolean; | - | - |
setVisibleDecorationBasicAxis | Set visible decoration shown basic axis | boolean; | - | - |
setVisibleDecorationBox | Set visible decoration shown box | boolean; | - | - |
setWorldCoordinates | Sets the preferred user coordinates for the panel | bounds; | - | - |
setWorldXMax | Sets the preferred maximum X coordinate for the panel | xmax; | - | - |
setWorldXMin | Sets the preferred minimum X coordinate for the panel | xmin; | - | - |
setWorldYMax | Sets the preferred maximum Y coordinate for the panel | ymax; | - | - |
setWorldYMin | Sets the preferred minimum Y coordinate for the panel | ymin; | - | - |
setWorldZMax | Sets the preferred maximum Z coordinate for the panel | zmax; | - | - |
setWorldZMin | Sets the preferred minimum Y coordinate for the panel | zmin; | - | - |
setZoomRate | Sets zoom rate | double; | - | - |
supportsWebGL | Whether webgl is supported | - | boolean | - |
Class | Description |
---|---|
EJSS_DRAWING3D.Element | Element is the basic class for 3D elements |
Property | Description | Type | Default | Values |
---|---|---|---|---|
EnabledPosition | Whether the user could change the position | boolean | false | - |
EnabledSize | Whether the user could change the size | boolean | false | - |
MovesGroup | Whether the group position also changes when the element position changes | boolean | false | - |
Parent | Parent of the element | Panel|Group | - | - |
Position | Coordinates X, Y, and Z | double[3] | [0,0,0] | - |
ResizesGroup | Whether the group size also changes when the element size changes | boolean | false | - |
Size | Size along the X, Y, and Z axes | double[3] | [1,1,1] | - |
SizeX | Size along the X axis | double | 1 | - |
SizeY | Size along the Y axis | double | 1 | - |
SizeZ | Size along the Z axis | double | 1 | - |
X | Position in X | double | 0 | - |
Y | Position in Y | double | 0 | - |
Z | Position in Z | double | 0 | - |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
copyTo | Copies itself to another element | element Element; | - | - |
getController | Returns the controller object | - | Controller | - |
getGroup | Get the group of this element, if any | - | Group | - |
getGroupPanel | Returns the DrawingPanel in which it (or its final ancestor group) is displayed. | - | drawing3D.DrawingPanel | - |
getGroupTransformation | Get the group transformation of the element. | - | Transformation | - |
getName | Get name for element | - | string | - |
getPanel | For internal use only, use getGroupPanel() instead. Gets the panel for this element. | - | DrawingPanel | - |
getParent | Get the parent | - | parent Panel or Element | - |
getPosition | Get the coordinates of the element | - | double[3] | - |
getSetIndex | Get the index of this element in a set, if any | - | int | - |
getSize | Get the sizes of the element | - | double[] | - |
getSizeX | Get the size along the X coordinate of the element | - | double | - |
getSizeY | Get the size along the Y coordinate of the element | - | double | - |
getSizeZ | Get the size along the Z coordinate of the element | - | double | - |
getStyle | Return the style (defined in DrawingPanel.js) of the inner rectangle | - | boolean | - |
getTextureUrl | Get texture url | - | url | - |
getTransformation | Get the internal transformation of the element. | - | Transformation | - |
getX | Get the X coordinate of the element | - | double | - |
getY | Get the Y coordinate of the element | - | double | - |
getZ | Get the Z coordinate of the element | - | double | - |
isAlwaysUpdated | Whether element mesh must be always drawn | - | boolean | - |
isChanged | Whether the element projection has changed | - | boolean | - |
isGroupChanged | Returns whether the element group has changed. | - | boolean | - |
isGroupVisible | Returns the real visibility status of the element, which will be false if it belongs to an invisible group | - | boolean | - |
isMeasured | Whether the element is measured | - | boolean | - |
isVisible | Whether the element is visible | - | boolean | - |
registerProperties | Registers properties in a ControlElement | controller A ControlElement that becomes the element controller; | - | - |
setAlwaysUpdated | Tells whether element mesh must be always drawn | always boolean; | - | - |
setColor | Set color | color; | - | - |
setController | Set the controller | Controller; | - | - |
setGroup | To be used internally by Group only! Sets the group of this element. | group Group; | - | - |
setMeasured | Sets the measurability of the element | measured boolean; | - | - |
setMeshChanged | Tells the element mesh that it has changed. Typically used by subclasses when they change something. | changed boolean; | - | - |
setPanel | To be used internally by DrawingPanel only! Sets the panel for this element. | panel DrawingPanel; | - | - |
setParent | Set the parent | parent Panel or Element; | - | - |
setPosition | Set the coordinates of the element | position double[] an array of dimension 3; | - | - |
setProjChanged | Tells the element projection that it has changed. Typically used by subclasses when they change something. | changed boolean; | - | - |
setSet | To be used internally by ElementSet only! Sets the index of this element in the set | set ElementSet; index int; | - | - |
setSize | Set the size of the element | position double[] an array of dimension 3 or an object with {x,y,z} properties; | - | - |
setSizeX | Set the size along the X axis of the element | sizeX double; | - | - |
setSizeY | Set the size along the Y axis of the element | sizeY double; | - | - |
setSizeZ | Set the size along the Z axis of the element | sizeZ double; | - | - |
setTextureUrl | Set texture url | url; | - | - |
setTransformation | Sets 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; | - | - |
setVisible | Sets the visibility of the element | visible boolean; | - | - |
setX | Set the X coordinate of the element | x double; | - | - |
setY | Set the Y coordinate of the element | y double; | - | - |
setZ | Set the Z coordinate of the element | z double; | - | - |
Class | Description |
---|---|
EJSS_DRAWING3D.ElementSet | ElementSet is the basic class for a set of Elements |
Property | Description | Type | Default | Values |
---|---|---|---|---|
EnabledPosition | Whether the user could change the position | boolean | false | - |
EnabledSize | Whether the user could change the size | boolean | false | - |
MovesGroup | Whether the group position also changes when the element position changes | boolean | false | - |
ResizesGroup | Whether the group size also changes when the element size changes | boolean | false | - |
Class | Description |
---|---|
EJSS_DRAWING3D.Sphere | Sphere |
Property | Description | Type | Default | Values |
---|---|---|---|---|
Radius | Radius | number | 0.5 | - |
Class | Description |
---|---|
TextArea | TextArea |
Method | Description | Params | Return | Visibility |
---|---|---|---|---|
_addFontResizeListener | Add a function to be called when the font size changes | listener 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; | - | - |
_addOnBlurAction | Add a function to be called when the window in which the model runs looses focus | listener the function to be called; | - | - |
_addOnFocusAction | Add a function to be called when the window in which the model runs regains focus | listener the function to be called; | - | - |
_addOrientationChangeListener | Add a function to be called when the view orientation changes | listener a function to be called with possible the following parameters listener(width,height); where: width the new inner width height the new inner height; | - | - |
_addResizeListener | Add a function to be called when the view size changes | listener 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; | - | - |
_onBlur | Run OnBlur Actions | - | - | - |
_onFocus | Run OnFocus Actions | - | - | - |
_setInnerHTML | Run OnFocus Actions | - | - | - |
addText | Add the text and scroll to the bottom | value double; | - | - |
clear | Clear the text area | - | - | - |
setChangeColorOnEdit | Whether to change color onkeydown/onblur | change boolean; | - | - |