]> source.dussan.org Git - jquery-ui.git/commitdiff
sortable: implemented tolerance: "guess", which is also the default tolerance mode...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Mon, 26 May 2008 12:02:02 +0000 (12:02 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Mon, 26 May 2008 12:02:02 +0000 (12:02 +0000)
ui/source/ui.sortable.js

index 24339476d46086f8153e252f936ba437d89198a7..e923fbe490afc2388015c6e08f20f4b675fd6808 100644 (file)
                        var l = item.left, r = l + item.width, \r
                                t = item.top, b = t + item.height;\r
 \r
-                       if(this.options.tolerance == "pointer") {\r
+                       if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.currentItem[0].offsetHeight > item.item[0].offsetHeight)) {\r
 \r
                                if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false;\r
                                \r
        $.extend($.ui.sortable, {\r
                getter: "serialize toArray",\r
                defaults: {\r
+                       tolerance: "guess",\r
                        distance: 0,\r
                        delay: 0,\r
                        cancel: ":input,button",\r