mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Add comment about improving Rectangle#contains().
This commit is contained in:
parent
2a9066c555
commit
277ab844f2
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue