mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -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() {
|
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() {
|
setCenter: function() {
|
||||||
var center = Point.read(arguments);
|
var center = Point.read(arguments);
|
||||||
this.x = center.x - this.width * 0.5;
|
this.setCenterX(center.x);
|
||||||
this.y = center.y - this.height * 0.5;
|
this.setCenterY(center.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTopLeft: function() {
|
getTopLeft: function() {
|
||||||
|
@ -160,8 +160,8 @@ var Rectangle = this.Rectangle = Base.extend({
|
||||||
|
|
||||||
setBottomLeft: function() {
|
setBottomLeft: function() {
|
||||||
var bottomLeft = Point.read(arguments);
|
var bottomLeft = Point.read(arguments);
|
||||||
this.left = bottomLeft.x;
|
this.setLeft(bottomLeft.x);
|
||||||
this.bottom = bottomLeft.y;
|
this.setBottom(bottomLeft.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getBottomRight: function() {
|
getBottomRight: function() {
|
||||||
|
|
Loading…
Reference in a new issue