mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Allow chaining of Point setters.
This commit is contained in:
parent
a4c67a1bc1
commit
9f67f32701
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@ var Point = this.Point = Base.extend({
|
|||
set: function(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -157,6 +158,7 @@ var Point = this.Point = Base.extend({
|
|||
this.x *= scale;
|
||||
this.y *= scale;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
normalize: function(length) {
|
||||
|
@ -237,6 +239,7 @@ var Point = this.Point = Base.extend({
|
|||
this.x = Math.cos(angle) * length;
|
||||
this.y = Math.sin(angle) * length;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue