Class: Dimension

RaphaelSM. Dimension

represents dimension

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
Name Type Argument Description
type string <optional>
="c"] type fo arrow ("c" for civil engineering, "m" for mechanical engineering)
height number <optional>
=30.] height
overhang number <optional>
=6.] size of overhang
offset number <optional>
=10.] offset
textOffset number <optional>
=12.] text offset
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
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
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 1325

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