diff options
author | Felix Nagel <info@felixnagel.com> | 2013-03-03 13:48:01 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-03-03 13:48:01 +0100 |
commit | dffe8f66109714af2d4ed8f582af4cf3439433e3 (patch) | |
tree | d83889fc566946bd35e4f8dc866f2aac5e4b095a /ui/jquery.ui.draggable.js | |
parent | d94e217065745e9ad0638cf68d3d973ffe44035a (diff) | |
parent | 6d3a1e1fe8cc21f385456ea26075f3909136a589 (diff) | |
download | jquery-ui-dffe8f66109714af2d4ed8f582af4cf3439433e3.tar.gz jquery-ui-dffe8f66109714af2d4ed8f582af4cf3439433e3.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 9a31add7c..27b6b4ef0 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -600,7 +600,7 @@ $.ui.plugin.add("draggable", "connectToSortable", { //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid" if(this.shouldRevert) { - this.instance.options.revert = true; + this.instance.options.revert = this.shouldRevert; } //Trigger the stop of the sortable @@ -908,22 +908,19 @@ $.ui.plugin.add("draggable", "snap", { $.ui.plugin.add("draggable", "stack", { start: function() { - var min, - o = $(this).data("ui-draggable").options, + o = this.data("ui-draggable").options, group = $.makeArray($(o.stack)).sort(function(a,b) { return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); }); if (!group.length) { return; } - min = parseInt(group[0].style.zIndex, 10) || 0; + min = parseInt($(group[0]).css("zIndex"), 10) || 0; $(group).each(function(i) { - this.style.zIndex = min + i; + $(this).css("zIndex", min + i); }); - - this[0].style.zIndex = min + group.length; - + this.css("zIndex", (min + group.length)); } }); |