More beans clean-up in Rectangle.

This commit is contained in:
Jürg Lehni 2011-03-05 01:59:15 +00:00
parent e87e7b2582
commit b06bf88aed

View file

@ -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() {