mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Have Path#reverse also reverse the segment handles.
This commit is contained in:
parent
ccbdb2abe3
commit
81a15379e5
1 changed files with 9 additions and 1 deletions
|
@ -159,7 +159,15 @@ var Path = this.Path = PathItem.extend({
|
||||||
* Reverses the segments of the path.
|
* Reverses the segments of the path.
|
||||||
*/
|
*/
|
||||||
reverse: function() {
|
reverse: function() {
|
||||||
this._segments.reverse();
|
var segments = this._segments;
|
||||||
|
segments.reverse();
|
||||||
|
// Reverse the handles:
|
||||||
|
for (var i = 0, l = segments.length; i < l; i++) {
|
||||||
|
var segment = segments[i];
|
||||||
|
var handleIn = segment._handleIn;
|
||||||
|
segment._handleIn = segment._handleOut;
|
||||||
|
segment._handleOut = handleIn;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
join: function(path) {
|
join: function(path) {
|
||||||
|
|
Loading…
Reference in a new issue