new Path(elem)
Parameters:
Name | Type | Description |
---|---|---|
elem |
SVGPathElement |
- Source:
Throws:
-
If constructed without a path element
- Type
- Error
Methods
(static) subpathIsClosed(index) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer |
- Source:
Returns:
- Type
- boolean
addPtsToSelection(indexes) → {void}
Parameters:
Name | Type | Description |
---|---|---|
indexes |
Integer | Array.<Integer> |
- Source:
Returns:
- Type
- void
addSeg(index) → {void}
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer |
- Source:
Returns:
- Type
- void
clearSelection() → {void}
- Source:
Returns:
- Type
- void
deleteSeg(index) → {void}
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer |
- Source:
Returns:
- Type
- void
eachSeg(fn) → {void}
Parameters:
Name | Type | Description |
---|---|---|
fn |
module:path.PathEachSegCallback |
- Source:
Returns:
- Type
- void
endChanges(text) → {void}
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
- Source:
Returns:
- Type
- void
init() → {module:path.Path}
Reset path data.
- Source:
Returns:
- Type
- module:path.Path
moveCtrl(dx, dy) → {void}
Parameters:
Name | Type | Description |
---|---|---|
dx |
Integer | |
dy |
Integer |
- Source:
Returns:
- Type
- void
movePts(dx, dy) → {void}
Move selected points.
Parameters:
Name | Type | Description |
---|---|---|
dx |
Integer | |
dy |
Integer |
- Source:
Returns:
- Type
- void
removePtFromSelection(index) → {void}
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer |
- Source:
Returns:
- Type
- void
selectPt(pt, ctrlNum) → {void}
Parameters:
Name | Type | Description |
---|---|---|
pt |
Integer | |
ctrlNum |
Integer |
- Source:
Returns:
- Type
- void
setSegType(newTypenullable) → {void}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
newType |
Integer |
<nullable> |
See https://www.w3.org/TR/SVG/single-page.html#paths-InterfaceSVGPathSeg |
- Source:
Returns:
- Type
- void
show(y) → {Path}
Parameters:
Name | Type | Description |
---|---|---|
y |
Integer |
- Source:
Returns:
- Type
- Path
storeD() → {void}
- Source:
Returns:
- Type
- void
update() → {Path}
Update position of all points.
- Source:
Returns:
- Type
- Path