Shorten CompoundPath#moveBy().

This commit is contained in:
Jürg Lehni 2011-05-15 19:58:09 +01:00
parent 54161f81f1
commit ebdf5a2dfd

View file

@ -89,11 +89,9 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
path.moveTo.apply(path, arguments); path.moveTo.apply(path, arguments);
}, },
moveBy: function() { moveBy: function(point) {
var point = arguments.length ? Point.read(arguments) : new Point(), this.moveTo(getCurrentPath(this).getLastSegment()._point.add(
path = getCurrentPath(this), Point.read(arguments)));
current = path.segments[path.segments.length - 1]._point;
this.moveTo(current.add(point));
}, },
closePath: function() { closePath: function() {