Add explaining comment.

This commit is contained in:
Jürg Lehni 2013-05-24 17:14:39 -07:00
parent ed572e7d48
commit e359dd038c

View file

@ -126,6 +126,7 @@ var Rectangle = this.Rectangle = Base.extend(/** @lends Rectangle# */{
var to = Point.readNamed(arguments, 'to');
this.width = to.x - point.x;
this.height = to.y - point.y;
// Check if horizontal or vertical order needs to be reversed.
if (this.width < 0) {
this.x = to.x;
this.width = -this.width;