Class: ellps

ellps

Shortcut for creating SVG circles.

new ellps(options){ellps}

Initializes a new ellps instance.
Name Type Description
options Object Options used to customize the ellps
Name Type Default Description
parent * optional SVGElement which to append the primary element
id String optional The id of the instance. Auto-generated when not provided
cx Number 0 optional Center of the ellipse along the x-axis
cy Number 0 optional Center of the ellipse along the y-axis
rx Number 50 optional x-axis radius of the ellipse
ry Number 30 optional y-axis radius of the ellipse
fill String 'transparent' optional The default fill color
stroke String '#000000' optional The default stroke color
strokeWidth Number 1 optional The default stroke width
attr Object optional Attributes to apply to the ellps's SVGElement element.
css Object optional CSS Properties to apply to the ellps's SVGElement element.
Returns:
Type Description
ellps A new ellps instance.

Requires

Members

cxNumber

Center of the ellipse along the x-axis

cyNumber

Center of the ellipse along the y-axis

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 ellps's fill color

readonlyidString

The id of this instance's SVGElement element

readonlyparentSVGElement

The parent of the primary element

rxNumber

x-axis radius of the ellipse

ryNumber

y-axis radius of the ellipse

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 ellps's stroke color

strokeWidthNumber

The ellps's stroke width

Methods

staticellps.getElInstance(el){ellps}

returns the ellps instance associated with the provided element's id attribute
Name Type Description
el Element The element with the lookup id
Returns:
Type Description
ellps The associated ellps, if it exists

staticellps.getInstance(id){ellps}

returns the ellps instance associated with the id
Name Type Description
id String The lookup id
Returns:
Type Description
ellps The associated ellps, if it exists