mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 23:39:59 -05:00
Add expected parameters to function signature.
This commit is contained in:
parent
c4c4f51eb9
commit
54161f81f1
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
var fields = {
|
var fields = {
|
||||||
moveTo: function() {
|
moveTo: function(point) {
|
||||||
var path = new Path();
|
var path = new Path();
|
||||||
this.appendTop(path);
|
this.appendTop(path);
|
||||||
path.moveTo.apply(path, arguments);
|
path.moveTo.apply(path, arguments);
|
||||||
|
|
|
@ -762,14 +762,14 @@ var Path = this.Path = PathItem.extend({
|
||||||
* execute a moveTo() command first.
|
* execute a moveTo() command first.
|
||||||
*/
|
*/
|
||||||
return {
|
return {
|
||||||
moveTo: function() {
|
moveTo: function(point) {
|
||||||
// Let's not be picky about calling moveTo() when not at the
|
// Let's not be picky about calling moveTo() when not at the
|
||||||
// beginning of a path, just bail out:
|
// beginning of a path, just bail out:
|
||||||
if (!this._segments.length)
|
if (!this._segments.length)
|
||||||
this._add([ new Segment(Point.read(arguments)) ]);
|
this._add([ new Segment(Point.read(arguments)) ]);
|
||||||
},
|
},
|
||||||
|
|
||||||
lineTo: function() {
|
lineTo: function(point) {
|
||||||
// Let's not be picky about calling moveTo() first:
|
// Let's not be picky about calling moveTo() first:
|
||||||
this._add([ new Segment(Point.read(arguments)) ]);
|
this._add([ new Segment(Point.read(arguments)) ]);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue