diff options
author | Jason Moon <jmoon@socialcast.com> | 2012-04-24 22:27:35 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-04-30 13:04:18 -0400 |
commit | b8b0c528301ab2bfc49e36143a3c4f6451e58ccd (patch) | |
tree | 9f75c9372bcbea5aea3ac8a4133e9f2b435e07e6 | |
parent | 27d10235539e0f5baad6ee7e8d3d91cab65e2cfd (diff) | |
download | jquery-ui-b8b0c528301ab2bfc49e36143a3c4f6451e58ccd.tar.gz jquery-ui-b8b0c528301ab2bfc49e36143a3c4f6451e58ccd.zip |
Sortable: update placeholder when axis is x or y. Fixed #8274 - placeholder doesn't move when dragging outside of container element
-rw-r--r-- | ui/jquery.ui.sortable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index a6903b263..06df7971f 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -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(); |