From f306a826a4d3b4c36c3f86cb5feeee23bb0db4c3 Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Mar 2013 09:56:39 -0500 Subject: Sortable: update placeholder when axis is x or y for connected lists. Fixed #8301 - Placeholder doesn't move when using connectWith option --- ui/jquery.ui.sortable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 642d5d947..d16407216 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -535,7 +535,9 @@ $.widget("ui.sortable", $.ui.mouse, { b = t + item.height, dyClick = this.offset.click.top, dxClick = this.offset.click.left, - isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; if ( this.options.tolerance === "pointer" || this.options.forcePointerForContainers || -- cgit v1.2.3