new Dimension(paper, point1, point2, params)
Dimension
This:
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
paper |
Raphael.Paper | raphael instance | |||||||||||||||||||||||||
point1 |
RaphaelTools.Point2d | 1st point | |||||||||||||||||||||||||
point2 |
RaphaelTools.Point2d | 2nd point | |||||||||||||||||||||||||
params |
Object |
<optional> |
Properties
|
||||||||||||||||||||||||
prams.lower |
boolean |
<optional> |
=true] if the dimension is lower or upper from line point1-point2 | ||||||||||||||||||||||||
params.val |
string | number | =""] value to be displayed | |||||||||||||||||||||||||
prams.pathAttrs |
Object |
<optional> |
={}] attrs passed to path | ||||||||||||||||||||||||
prams.textAttrs |
Object |
<optional> |
={}] attrs passed to text | ||||||||||||||||||||||||
prams.arrowSize |
number |
<optional> |
=overhang] arrow size (only for "c" type) | ||||||||||||||||||||||||
prams.threshold |
number |
<optional> |
=1.] length threshold, if length is lower, the dimension is hidden |
- Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1325
Properties:
Name | Type | Description |
---|---|---|
point1 |
Point2d | 1st point |
point2 |
Point2d | 2nd point |
type |
string | type fo arrow ("c" for civil engineering, "m" for mechanical engineering) |
height |
number | height |
overhang |
number | size of overhang |
offset |
number | offset |
textOffset |
number | text offset |
val |
string | number | value to be displayed |
path |
Raphael.el | path |
text |
Raphael.el | text |
pathList |
Array | path list |
arrowSize |
number | arrow size |
threshold |
number | length threshold |
lower |
boolean | if the dimension is lower or upper |
Methods
-
<static> create() → {RaphaelSM.Dimension}
-
Creates new Dimension object, for parameters meaning see RaphaelSM.Dimension
- Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1416
Returns:
new Dimension object- Type
- RaphaelSM.Dimension
-
hide()
-
Hides receiver
- Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1401
-
setVal(val)
-
Sets new (text) value of receiver
Parameters:
Name Type Description val
string | number new text value - Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1394
-
show()
-
Shows receiver
- Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1408
-
update()
-
Updates receiver
- Source:
- /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1348