mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Shorten CompoundPath#moveBy().
This commit is contained in:
parent
54161f81f1
commit
ebdf5a2dfd
1 changed files with 3 additions and 5 deletions
|
@ -89,11 +89,9 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
path.moveTo.apply(path, arguments);
|
||||
},
|
||||
|
||||
moveBy: function() {
|
||||
var point = arguments.length ? Point.read(arguments) : new Point(),
|
||||
path = getCurrentPath(this),
|
||||
current = path.segments[path.segments.length - 1]._point;
|
||||
this.moveTo(current.add(point));
|
||||
moveBy: function(point) {
|
||||
this.moveTo(getCurrentPath(this).getLastSegment()._point.add(
|
||||
Point.read(arguments)));
|
||||
},
|
||||
|
||||
closePath: function() {
|
||||
|
|
Loading…
Reference in a new issue