]> source.dussan.org Git - jquery-ui.git/commitdiff
Sortable: update placeholder when axis is x or y. Fixed #8274 - placeholder doesn...
authorJason Moon <jmoon@socialcast.com>
Wed, 25 Apr 2012 03:27:35 +0000 (22:27 -0500)
committerScott González <scott.gonzalez@gmail.com>
Mon, 30 Apr 2012 17:04:18 +0000 (13:04 -0400)
ui/jquery.ui.sortable.js

index a6903b2631568f4804486b1280a8bfc14afe5b7b..06df7971f5fef807a3bd167de1c361144f2e48d0 100644 (file)
@@ -467,8 +467,8 @@ $.widget("ui.sortable", $.ui.mouse, {
 
        _intersectsWithPointer: function(item) {
 
-               var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
-                       isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+               var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+                       isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
                        isOverElement = isOverElementHeight && isOverElementWidth,
                        verticalDirection = this._getDragVerticalDirection(),
                        horizontalDirection = this._getDragHorizontalDirection();