mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: make the hasScroll method private
This commit is contained in:
parent
b1e4aa9a1f
commit
2360af22a8
8
ui/jquery.ui.menu.js
vendored
8
ui/jquery.ui.menu.js
vendored
@ -118,7 +118,7 @@ $.widget("ui.menu", {
|
|||||||
|
|
||||||
activate: function( event, item ) {
|
activate: function( event, item ) {
|
||||||
this.deactivate();
|
this.deactivate();
|
||||||
if (this.hasScroll()) {
|
if (this._hasScroll()) {
|
||||||
var offset = item.offset().top - this.element.offset().top,
|
var offset = item.offset().top - this.element.offset().top,
|
||||||
scroll = this.element.attr("scrollTop"),
|
scroll = this.element.attr("scrollTop"),
|
||||||
elementHeight = this.element.height();
|
elementHeight = this.element.height();
|
||||||
@ -177,7 +177,7 @@ $.widget("ui.menu", {
|
|||||||
|
|
||||||
// TODO merge with previousPage
|
// TODO merge with previousPage
|
||||||
nextPage: function(event) {
|
nextPage: function(event) {
|
||||||
if (this.hasScroll()) {
|
if (this._hasScroll()) {
|
||||||
// TODO merge with no-scroll-else
|
// TODO merge with no-scroll-else
|
||||||
if (!this.active || this.last()) {
|
if (!this.active || this.last()) {
|
||||||
this.activate(event, this.element.children(":first"));
|
this.activate(event, this.element.children(":first"));
|
||||||
@ -203,7 +203,7 @@ $.widget("ui.menu", {
|
|||||||
|
|
||||||
// TODO merge with nextPage
|
// TODO merge with nextPage
|
||||||
previousPage: function(event) {
|
previousPage: function(event) {
|
||||||
if (this.hasScroll()) {
|
if (this._hasScroll()) {
|
||||||
// TODO merge with no-scroll-else
|
// TODO merge with no-scroll-else
|
||||||
if (!this.active || this.first()) {
|
if (!this.active || this.first()) {
|
||||||
this.activate(event, this.element.children(":last"));
|
this.activate(event, this.element.children(":last"));
|
||||||
@ -228,7 +228,7 @@ $.widget("ui.menu", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hasScroll: function() {
|
_hasScroll: function() {
|
||||||
return this.element.height() < this.element.attr("scrollHeight");
|
return this.element.height() < this.element.attr("scrollHeight");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user