mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Add Path#first/lastSegment.
This commit is contained in:
parent
551b28e27c
commit
8d5024523c
1 changed files with 10 additions and 0 deletions
|
@ -33,6 +33,16 @@ var Path = this.Path = PathItem.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// TODO: Add back to Scriptographer:
|
||||||
|
|
||||||
|
getFirstSegment: function() {
|
||||||
|
return this._segments[0];
|
||||||
|
},
|
||||||
|
|
||||||
|
getLastSegment: function() {
|
||||||
|
return this._segments[this._segments.length - 1];
|
||||||
|
},
|
||||||
|
|
||||||
// TODO: Consider adding getSubPath(a, b), returning a part of the current
|
// TODO: Consider adding getSubPath(a, b), returning a part of the current
|
||||||
// path, with the added benefit that b can be < a, and closed looping is
|
// path, with the added benefit that b can be < a, and closed looping is
|
||||||
// taken into account.
|
// taken into account.
|
||||||
|
|
Loading…
Reference in a new issue