r1325 - trunk/ui

r1325 - trunk/ui


Author: paul.bakaus
Date: Tue Dec 30 07:01:19 2008
New Revision: 1325
Modified:
trunk/ui/ui.draggable.js
Log:
draggable: containment doesn't respect margins anymore (logical, and fixes
3538)
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js    (original)
+++ trunk/ui/ui.draggable.js    Tue Dec 30 07:01:19 2008
@@ -249,10 +249,10 @@
            var over = ($(ce).css("overflow") != 'hidden');
            this.containment = [
-                co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.offset.relative.left - this.offset.parent.left,
-                co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.offset.relative.top - this.offset.parent.top,
-                co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) :
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.offset.relative.left - this.offset.parent.left -
this.helperProportions.width - this.margins.left -
(parseInt(this.element.css("marginRight"),10) || 0),
-                co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) :
ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.offset.relative.top - this.offset.parent.top -
this.helperProportions.height - this.margins.top -
(parseInt(this.element.css("marginBottom"),10) || 0)
+                co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.offset.relative.left - this.offset.parent.left - this.margins.left,
+                co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.offset.relative.top - this.offset.parent.top - this.margins.top,
+                co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) :
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
this.offset.relative.left - this.offset.parent.left -
this.helperProportions.width - this.margins.left,
+                co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) :
ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) -
this.offset.relative.top - this.offset.parent.top -
this.helperProportions.height - this.margins.top
            ];
        }