r1860 - trunk/ui

r1860 - trunk/ui


Author: paul.bakaus
Date: Thu Jan 29 07:25:02 2009
New Revision: 1860
Modified:
trunk/ui/ui.sortable.js
Log:
sortable: containment option now respects the padding (fixes #3958)
Modified: trunk/ui/ui.sortable.js
==============================================================================
--- trunk/ui/ui.sortable.js    (original)
+++ trunk/ui/ui.sortable.js    Thu Jan 29 07:25:02 2009
@@ -778,10 +778,10 @@
            var over = ($(ce).css("overflow") != 'hidden');
            this.containment = [
-                co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.margins.left,
-                co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.margins.top,
-                co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) :
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.helperProportions.width - this.margins.left,
-                co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) :
ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.helperProportions.height - this.margins.top
+                co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) +
(parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+                co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) +
(parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+                co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) :
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
(parseInt($(ce).css("paddingRight"),10) || 0) -
this.helperProportions.width - this.margins.left,
+                co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) :
ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) -
(parseInt($(ce).css("paddingBottom"),10) || 0) -
this.helperProportions.height - this.margins.top
            ];
        }