mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
More beans clean-up in Rectangle.
This commit is contained in:
parent
e87e7b2582
commit
b06bf88aed
1 changed files with 5 additions and 5 deletions
|
@ -125,13 +125,13 @@ var Rectangle = this.Rectangle = Base.extend({
|
|||
},
|
||||
|
||||
getCenter: function() {
|
||||
return Point.create(this.x + this.width * 0.5, this.y + this.height * 0.5);
|
||||
return Point.create(this.getCenterX(), this.getCenterY());
|
||||
},
|
||||
|
||||
setCenter: function() {
|
||||
var center = Point.read(arguments);
|
||||
this.x = center.x - this.width * 0.5;
|
||||
this.y = center.y - this.height * 0.5;
|
||||
this.setCenterX(center.x);
|
||||
this.setCenterY(center.y);
|
||||
},
|
||||
|
||||
getTopLeft: function() {
|
||||
|
@ -160,8 +160,8 @@ var Rectangle = this.Rectangle = Base.extend({
|
|||
|
||||
setBottomLeft: function() {
|
||||
var bottomLeft = Point.read(arguments);
|
||||
this.left = bottomLeft.x;
|
||||
this.bottom = bottomLeft.y;
|
||||
this.setLeft(bottomLeft.x);
|
||||
this.setBottom(bottomLeft.y);
|
||||
},
|
||||
|
||||
getBottomRight: function() {
|
||||
|
|
Loading…
Reference in a new issue