aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Moon <jmoon@socialcast.com>2012-04-24 22:27:35 -0500
committerScott González <scott.gonzalez@gmail.com>2012-04-30 13:04:38 -0400
commit81835fab0c43f18e4033650adaeae2f22d3efd5b (patch)
tree57a43bf57f9997a544557a5fe9edb4d4b202a725
parentf0c3cf6f1a623e7e6aa19c182b2b61c783a3bfc3 (diff)
downloadjquery-ui-81835fab0c43f18e4033650adaeae2f22d3efd5b.tar.gz
jquery-ui-81835fab0c43f18e4033650adaeae2f22d3efd5b.zip
Sortable: update placeholder when axis is x or y. Fixed #8274 - placeholder doesn't move when dragging outside of container element
(cherry picked from commit b8b0c528301ab2bfc49e36143a3c4f6451e58ccd)
-rw-r--r--ui/jquery.ui.sortable.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 007ac06a3..c1566fd58 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -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();