r992 - trunk/ui
r992 - trunk/ui
Author: eduardolundgren
Date: Fri Nov 21 10:41:57 2008
New Revision: 992
Modified:
trunk/ui/ui.sortable.js
Log:
Sortables: using isOverAxis.
Modified: trunk/ui/ui.sortable.js
==============================================================================
--- trunk/ui/ui.sortable.js (original)
+++ trunk/ui/ui.sortable.js Fri Nov 21 10:41:57 2008
@@ -395,8 +395,8 @@
return false;
}
- var isOverElementHeight = $.ui.isOverHeight(helperTop + dyClick,
itemTop, itemHeight);
- var isOverElementWidth = $.ui.isOverWidth(helperLeft + dxClick,
itemLeft, itemWidth);
+ var isOverElementHeight = $.ui.isOverAxis(helperTop + dyClick, itemTop,
itemHeight);
+ var isOverElementWidth = $.ui.isOverAxis(helperLeft + dxClick, itemLeft,
itemWidth);
var isOverElement = isOverElementHeight && isOverElementWidth;
var verticalDirection = this._getDragVerticalDirection();
var horizontalDirection = this._getDragHorizontalDirection();
@@ -429,9 +429,9 @@
var itemHeight = item.height, itemWidth = item.width;
var itemTop = item.top, itemLeft = item.left;
- var isOverBottomHalf = $.ui.isOverHeight(helperTop + dyClick, itemTop +
(itemHeight/2), itemHeight);
+ var isOverBottomHalf = $.ui.isOverAxis(helperTop + dyClick, itemTop +
(itemHeight/2), itemHeight);
var isOverTopHalf = !isOverBottomHalf;
- var isOverRightHalf = $.ui.isOverWidth(helperLeft + dxClick, itemLeft +
(itemWidth/2), itemWidth);
+ var isOverRightHalf = $.ui.isOverAxis(helperLeft + dxClick, itemLeft +
(itemWidth/2), itemWidth);
var isOverLeftHalf = !isOverRightHalf;
var verticalDirection = this._getDragVerticalDirection();
var horizontalDirection = this._getDragHorizontalDirection();