SvgPath

SvgPath

new

The SvgPath widget creates a DOM element for a single SVG path.

Parameters:
Name Type Description
container Element | String The DOM element or ID that will contain the SVG.
pathWidth Number The width of the SVG path with no transformations applied.
pathHeight Number The height of the SVG path with no transformations applied.
path String The SVG path as a string.
Throws:
Example
// Create a home button
var svgPath = new SvgPath(container, 28, 28, 'M14,4l-10,8.75h20l-4.25-3.7188v-4.6562\
h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313\
h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z');
Source:

Members

:Element

Gets the parent container.

:Element

Gets the root node of the SVG.

:String

Gets the path.

Methods

Destroys the animation widget. Should be called if permanently removing the widget from layout.

Returns:
Boolean true if the object has been destroyed, false otherwise.