new rect(options){rect}
Initializes a new rect instance.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Options used to customize the rect
|
Returns:
Type | Description |
---|---|
rect | A new rect instance. |
Requires
Members
-
dasharray*
-
The stroke-dasharray of the primary element
-
dashoffset*
-
The stroke-dashoffset of the primary element
-
readonlyelSVGElement
-
The SVGElement element associated with this instance
-
fillString
-
The rect's fill color
-
heightNumber
-
Height of the rectangle
-
readonlyidString
-
The id of this instance's SVGElement element
-
readonlyparentSVGElement
-
The parent of the primary element
-
rxNumber
-
x-axis radius of the ellipse used to round off the corners of the rectangle
-
ryNumber
-
y-axis radius of the ellipse used to round off the corners of the rectangle
-
sliceString
-
Control how much of the primary element's stroke is drawn. Space-delimited values define a slice, ie '10 30'. A single value asserts 0 as the starting value. Accepts percentages for relative values
-
strokeString
-
The rect's stroke color
-
strokeWidthNumber
-
The rect's stroke width
-
widthNumber
-
Width of the rectangle
-
xNumber
-
Origin of the rectangle along the x-axis
-
yNumber
-
Origin of the rectangle along the y-axis
Methods
-
staticrect.getElInstance(el){rect}
-
returns the rect instance associated with the provided element's id attribute
Name Type Description el
Element The element with the lookup id Returns:
Type Description rect The associated rect, if it exists -
staticrect.getInstance(id){rect}
-
returns the rect instance associated with the id
Name Type Description id
String The lookup id Returns:
Type Description rect The associated rect, if it exists