]> 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:38 +0000 (13:04 -0400)
(cherry picked from commit b8b0c528301ab2bfc49e36143a3c4f6451e58ccd)

ui/jquery.ui.sortable.js

index 007ac06a34b2bff750b2fa2b75997967e6f48e46..c1566fd58bfc167e7ce26765b28e7ac19825c7f3 100644 (file)
@@ -468,8 +468,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();