Add expected parameters to function signature.

This commit is contained in:
Jürg Lehni 2011-05-15 19:57:48 +01:00
parent c4c4f51eb9
commit 54161f81f1
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
}
var fields = {
moveTo: function() {
moveTo: function(point) {
var path = new Path();
this.appendTop(path);
path.moveTo.apply(path, arguments);

View file

@ -762,14 +762,14 @@ var Path = this.Path = PathItem.extend({
* execute a moveTo() command first.
*/
return {
moveTo: function() {
moveTo: function(point) {
// Let's not be picky about calling moveTo() when not at the
// beginning of a path, just bail out:
if (!this._segments.length)
this._add([ new Segment(Point.read(arguments)) ]);
},
lineTo: function() {
lineTo: function(point) {
// Let's not be picky about calling moveTo() first:
this._add([ new Segment(Point.read(arguments)) ]);
},