aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.core.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r--ui/ui.core.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 3420d48b4..fe0737f92 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -106,19 +106,19 @@ $.ui = {
return has;
},
- intersectHeight: function(aTop, bTop, bHeight) {
- //Determines when "aTop" element coordinate intersects with b element height
- return (aTop > bTop) && (aTop < (bTop + bHeight));
+ isOverHeight: function(y, bTop, bHeight) {
+ //Determines when "y" coordinate intersects with b element height
+ return (y > bTop) && (y < (bTop + bHeight));
},
- intersectWidth: function(aLeft, bLeft, bWidth) {
- //Determines when "aLeft" element coordinate intersects with b element width
- return (aLeft > bLeft) && (aLeft < (bLeft + bWidth));
+ isOverWidth: function(x, bLeft, bWidth) {
+ //Determines when "x" coordinate intersects with b element width
+ return (x > bLeft) && (x < (bLeft + bWidth));
},
- intersects: function(aTop, aLeft, bTop, bLeft, bHeight, bWidth) {
+ isOver: function(y, x, bTop, bLeft, bHeight, bWidth) {
//Determines when element "a" coordinates intersects with element "b"
- return $.ui.intersectHeight(aTop, bTop, bHeight) && $.ui.intersectWidth(aLeft, bLeft, bWidth);
+ return $.ui.isOverHeight(y, bTop, bHeight) && $.ui.isOverWidth(x, bLeft, bWidth);
}
};