mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-02-16 17:25:34 -05:00
sortable: containment option now respects the padding (fixes #3958)
This commit is contained in:
@@ -778,10 +778,10 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
|
||||
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
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user