diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rect.coffee | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/lib/rect.coffee b/lib/rect.coffee index 703c640c..0e9c3417 100644 --- a/lib/rect.coffee +++ b/lib/rect.coffee @@ -74,6 +74,11 @@ Rect =      rect1.bottom > rect2.top and      rect1.top < rect2.bottom +  # Determine whether two rects overlap, including 0-width intersections at borders. +  intersectsStrict: (rect1, rect2) -> +    rect1.right >= rect2.left and rect1.left <= rect2.right and +    rect1.bottom >= rect2.top and rect1.top <= rect2.bottom +    equals: (rect1, rect2) ->      for property in ["top", "bottom", "left", "right", "width", "height"]        return false if rect1[property] != rect2[property] @@ -83,11 +88,6 @@ Rect =      @create (Math.max rect1.left, rect2.left), (Math.max rect1.top, rect2.top),          (Math.min rect1.right, rect2.right), (Math.min rect1.bottom, rect2.bottom) -  # Determine whether two rects overlap. -  rectsOverlap: (rect1, rect2) -> -    rect1.right >= rect2.left and rect1.left <= rect2.right and -    rect1.bottom >= rect2.top and rect1.top <= rect2.bottom -  root = exports ? (window.root ?= {})  root.Rect = Rect  extend window, root unless exports? | 
