[PE] [SSE] Optimization of right panel.

This commit is contained in:
Julia Radzhabova 2016-10-18 11:58:27 +03:00
parent bfc91dc91f
commit a7e603ca5f
4 changed files with 10 additions and 8 deletions

View file

@ -148,14 +148,15 @@ define([
}
}
var lastactive = -1, currentactive, priorityactive = -1;
var lastactive = -1, currentactive, priorityactive = -1,
activePane = this.rightmenu.GetActivePane();
for (i=0; i<this._settings.length; i++) {
var pnl = this._settings[i];
if (pnl===undefined) continue;
if ( pnl.hidden ) {
if (!pnl.btn.isDisabled()) pnl.btn.setDisabled(true);
if (this.rightmenu.GetActivePane() == pnl.panelId)
if (activePane == pnl.panelId)
currentactive = -1;
} else {
if (pnl.btn.isDisabled()) pnl.btn.setDisabled(false);
@ -165,7 +166,7 @@ define([
pnl.needShow = false;
priorityactive = i;
} else if ( i != Common.Utils.documentSettingsType.Slide || this.rightmenu._settings[i].isCurrent) {
if (this.rightmenu.GetActivePane() == pnl.panelId)
if (activePane == pnl.panelId)
currentactive = i;
}

View file

@ -254,7 +254,7 @@ define([
},
GetActivePane: function() {
return (this.minimizedMode) ? null : $(".settings-panel.active")[0].id;
return (this.minimizedMode) ? null : this.$el.find(".settings-panel.active")[0].id;
},
SetDisabled: function(id, disabled, all) {

View file

@ -177,7 +177,8 @@ define([
this._settings[settingsType].hidden = 0;
}
var lastactive = -1, currentactive, priorityactive = -1;
var lastactive = -1, currentactive, priorityactive = -1,
activePane = this.rightmenu.GetActivePane();
for (i=0; i<this._settings.length; ++i) {
var pnl = this._settings[i];
if (pnl===undefined) continue;
@ -185,7 +186,7 @@ define([
if ( pnl.hidden ) {
if ( !pnl.btn.isDisabled() )
pnl.btn.setDisabled(true);
if (this.rightmenu.GetActivePane() == pnl.panelId)
if (activePane == pnl.panelId)
currentactive = -1;
} else {
if ( pnl.btn.isDisabled() )
@ -194,7 +195,7 @@ define([
if ( pnl.needShow ) {
pnl.needShow = false;
priorityactive = i;
} else if (this.rightmenu.GetActivePane() == pnl.panelId)
} else if (activePane == pnl.panelId)
currentactive = i;
pnl.panel.setLocked(pnl.locked);
}

View file

@ -234,7 +234,7 @@ define([
},
GetActivePane: function() {
return (this.minimizedMode) ? null : $(".settings-panel.active")[0].id;
return (this.minimizedMode) ? null : this.$el.find(".settings-panel.active")[0].id;
},
clearSelection: function() {