aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.draggable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-12-30 15:01:19 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-12-30 15:01:19 +0000
commit8bd784a6f3b483b96ad7f536b4872e8ab94c7afe (patch)
treef181081d3d7d0e0bf3a0d7ddd3ec35911a1a6377 /ui/ui.draggable.js
parentee26c404d100883cec75c22319d816bbb8402ce8 (diff)
downloadjquery-ui-8bd784a6f3b483b96ad7f536b4872e8ab94c7afe.tar.gz
jquery-ui-8bd784a6f3b483b96ad7f536b4872e8ab94c7afe.zip
draggable: containment doesn't respect margins anymore (logical, and fixes 3538)
Diffstat (limited to 'ui/ui.draggable.js')
-rw-r--r--ui/ui.draggable.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index d0671ac14..fc25ab3fd 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -249,10 +249,10 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
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
];
}