Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 427503 - Orion New UI Improvements
- Clear previous timeout

--Signed-off-by: Elijah El-Haddad <elijahe@ca.ibm.com>
  • Loading branch information
elijahe committed Feb 5, 2014
1 parent a2fb82f commit 7001268
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bundles/org.eclipse.orion.client.ui/web/orion/webui/SideMenu.js
Expand Up @@ -70,12 +70,20 @@ define([

if( sideMenuNavigation === this.CLOSED_STATE ){
this.setPageContentLeft("0"); //$NON-NLS-0$
window.setTimeout(function() {
if (this._timeout) {
window.clearTimeout(this._timeout);
this._timeout = null;
}
this._timeout = window.setTimeout(function() {
parent.style.display = 'none'; //$NON-NLS-0$
}, this.TRANSITION_DURATION_MS);
}

if( sideMenuNavigation === this.OPEN_STATE ){
if (this._timeout) {
window.clearTimeout(this._timeout);
this._timeout = null;
}
parent.style.display = 'block'; //$NON-NLS-0$
parent.style.width = this.SIDE_MENU_OPEN_WIDTH;
this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH);
Expand Down

0 comments on commit 7001268

Please sign in to comment.