aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-05-24 18:34:32 +0200
committerFelix Nagel <info@felixnagel.com>2012-05-24 18:34:32 +0200
commitb30184d885329317b9dbd70835d2c4d154f98475 (patch)
tree445acc2481e8456211c3e893e7789fe4b5978791 /ui/jquery.ui.sortable.js
parentec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (diff)
parenta1f604eb453208c80ec17c42c7bb4e3a1c624102 (diff)
downloadjquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.tar.gz
jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.zip
Merge with master
Diffstat (limited to 'ui/jquery.ui.sortable.js')
-rw-r--r--ui/jquery.ui.sortable.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 55a64590b..88c8aa374 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -731,9 +731,10 @@ $.widget("ui.sortable", $.ui.mouse, {
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
for (var j = this.items.length - 1; j >= 0; j--) {
if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
- var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
+ var cur = this.containers[innermostIndex].floating ? this.items[j].item.offset().left : this.items[j].item.offset().top;
if(Math.abs(cur - base) < dist) {
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ this.direction = (cur - base > 0) ? 'down' : 'up';
}
}