r3399 committed - menu: page up/down adjustment, always scroll a full page
Revision: 3399
Author: joern.zaefferer
Date: Sun Nov 1 03:07:21 2009
Log: menu: page up/down adjustment, always scroll a full page
http://code.google.com/p/jquery-ui/source/detail?r=3399
Modified:
/branches/dev/ui/jquery.ui.menu.js
=======================================
--- /branches/dev/ui/jquery.ui.menu.js Mon Oct 26 15:18:10 2009
+++ /branches/dev/ui/jquery.ui.menu.js Sun Nov 1 03:07:21 2009
@@ -98,7 +98,7 @@
var offsetBase = this.element.offset().top,
height = this.element.height();
var result = this.element.children("li").filter(function() {
- var close = $(this).offset().top - offsetBase - height * 1.5 -
$(this).height() / 2;
+ var close = $(this).offset().top - offsetBase - height * 2 +
$(this).height() * 2;
// TODO improve approximation
return close < 10 && close > -10;
})
@@ -136,7 +136,7 @@
var offsetBase = this.element.offset().top,
height = this.element.height();
var result = this.element.children("li").filter(function() {
- var close = $(this).offset().top - offsetBase + height / 2 +
$(this).height() / 2;
+ var close = $(this).offset().top - offsetBase + height -
$(this).height();
// TODO improve approximation
return close < 10 && close > -10;
})