[DE][PE] Fix bug with right panel

This commit is contained in:
Julia Radzhabova 2020-11-11 17:46:13 +03:00
parent 7db7e86f83
commit 900ffe6f33
2 changed files with 12 additions and 4 deletions

View file

@ -53,6 +53,7 @@ define([
initialize: function() {
this.editMode = true;
this._initSettings = true;
this.addListeners({
'RightMenu': {
@ -106,10 +107,13 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
},
onFocusObject: function(SelectedObjects, open) {
onFocusObject: function(SelectedObjects) {
if (!this.editMode)
return;
var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
this._initSettings = false;
var can_add_table = false,
in_equation = false,
needhide = true;
@ -280,7 +284,7 @@ define([
// this.rightmenu.shapeSettings.createDelayedElements();
var selectedElements = this.api.getSelectedElements();
if (selectedElements.length>0) {
this.onFocusObject(selectedElements, !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu));
this.onFocusObject(selectedElements);
}
}
},

View file

@ -55,6 +55,7 @@ define([
initialize: function() {
this.editMode = true;
this._state = {no_slides: undefined};
this._initSettings = true;
this.addListeners({
'RightMenu': {
@ -105,10 +106,13 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
},
onFocusObject: function(SelectedObjects, open) {
onFocusObject: function(SelectedObjects) {
if (!this.editMode)
return;
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
this._initSettings = false;
var needhide = true;
for (var i=0; i<this._settings.length; i++) {
if (i==Common.Utils.documentSettingsType.Signature) continue;
@ -285,7 +289,7 @@ define([
// this.rightmenu.shapeSettings.createDelayedElements();
var selectedElements = this.api.getSelectedElements();
if (selectedElements.length>0) {
this.onFocusObject(selectedElements, !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu));
this.onFocusObject(selectedElements);
}
}
},