]> source.dussan.org Git - jquery-ui.git/commitdiff
Droppable: Adjust fit tolerance to allow dropping an element exactly the same size...
authorScott González <scott.gonzalez@gmail.com>
Tue, 6 Jul 2010 16:15:47 +0000 (12:15 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 6 Jul 2010 16:15:47 +0000 (12:15 -0400)
ui/jquery.ui.droppable.js

index 4cd7f56e26404fbdfc390154186f97114674dc7b..429e1518a759aa8c7a4bb96d3082a076fea84edd 100644 (file)
@@ -161,8 +161,8 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
 
        switch (toleranceMode) {
                case 'fit':
-                       return (l < x1 && x2 < r
-                               && t < y1 && y2 < b);
+                       return (l <= x1 && x2 <= r
+                               && t <= y1 && y2 <= b);
                        break;
                case 'intersect':
                        return (l < x1 + (draggable.helperProportions.width / 2) // Right Half