Constructor
new DrawingData(data, documentopt)
- See:
-
- BaseDrawing
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
_id |
string | The _id which uniquely identifies this BaseDrawing embedded document |
||
author |
string | The _id of the user who created the drawing |
||
t |
string | The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing |
||
x |
number | The x-coordinate position of the top-left corner of the drawn shape |
||
y |
number | The y-coordinate position of the top-left corner of the drawn shape |
||
width |
number | The pixel width of the drawing figure |
||
height |
number | The pixel height of the drawing figure |
||
rotation |
number |
<optional> |
0
|
The angle of rotation for the drawing figure |
z |
number |
<optional> |
0
|
The z-index of this drawing relative to other siblings |
points |
Array.<Array.<number>> |
<optional> |
An array of points [x,y] which define polygon vertices |
|
bezierFactor |
number |
<optional> |
0
|
An amount of bezier smoothing applied, between 0 and 1 |
fillType |
number |
<optional> |
0
|
The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES |
fillColor |
string |
<optional> |
An optional color string with which to fill the drawing geometry |
|
fillAlpha |
number |
<optional> |
0.5
|
The opacity of the fill applied to the drawing geometry |
strokeWidth |
number |
<optional> |
8
|
The width in pixels of the boundary lines of the drawing geometry |
strokeColor |
number |
<optional> |
The color of the boundary lines of the drawing geometry |
|
strokeAlpha |
number |
<optional> |
1
|
The opacity of the boundary lines of the drawing geometry |
texture |
string |
<optional> |
The path to a tiling image texture used to fill the drawing geometry |
|
text |
string |
<optional> |
Optional text which is displayed overtop of the drawing |
|
fontFamily |
string |
<optional> |
Signika
|
The font family used to display text within this drawing |
fontSize |
number |
<optional> |
48
|
The font size used to display text within this drawing |
textColor |
string |
<optional> |
#FFFFFF
|
The color of text displayed within this drawing |
textAlpha |
number |
<optional> |
1
|
The opacity of text displayed within this drawing |
hidden |
boolean |
<optional> |
false
|
Is the drawing currently hidden? |
locked |
boolean |
<optional> |
false
|
Is the drawing currently locked? |
flags |
object |
<optional> |
{}
|
An object of optional key/value flags |
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
object | Initial data used to construct the data object |
|
document |
BaseDrawing |
<optional> |
The embedded document to which this data object belongs |
Extends
- DocumentData