Add comment about improving Rectangle#contains().

This commit is contained in:
Jürg Lehni 2011-07-05 01:17:55 +02:00
parent 2a9066c555
commit 277ab844f2

View file

@ -455,6 +455,7 @@ var Rectangle = this.Rectangle = Base.extend(/** @lends Rectangle# */{
* }
*/
contains: function(rect) {
// TODO: improve handling of passed Rectangle or Point
if (rect.width !== undefined) {
return rect.x >= this.x && rect.y >= this.y
&& rect.x + rect.width <= this.x + this.width