Skip to content

Commit

Permalink
Change menu to only set the menu index on show
Browse files Browse the repository at this point in the history
  • Loading branch information
Meiguro committed Aug 28, 2014
1 parent c298d17 commit 58370c3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/js/ui/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ util2.copy(Emitter.prototype, Menu.prototype);
Menu.prototype._show = function() {
this._resolveMenu();
Window.prototype._show.apply(this, arguments);
var select = this._selection;
simply.impl.menuSelection(select.sectionIndex, select.itemIndex);
};

Menu.prototype._numPreloadItems = 5;
Expand Down Expand Up @@ -146,7 +148,7 @@ Menu.prototype._resolveSection = function(e, clear) {
simply.impl.menuSection.call(this, e.sectionIndex, section, clear);
var select = this._selection;
if (select.sectionIndex === e.sectionIndex) {
this._preloadSection(select);
this._preloadItems(select);
}
return true;
}
Expand All @@ -170,11 +172,6 @@ Menu.prototype._preloadItems = function(e) {
}
};

Menu.prototype._preloadSection = function(e) {
simply.impl.menuSelection(e.sectionIndex, e.itemIndex);
this._preloadItems(e);
};

Menu.prototype._emitSelect = function(e) {
this._selection = e;
var item = this._getItem(e);
Expand Down

0 comments on commit 58370c3

Please sign in to comment.