Bug 64073, Bug 64489

This commit is contained in:
Julia Radzhabova
2023-10-05 00:34:32 +03:00
parent 729044a846
commit c8dc20ab09
16 changed files with 65 additions and 17 deletions

View File

@ -317,7 +317,7 @@ define([
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props);
else
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel);
this.rightmenu.updateScroller();
(active !== currentactive) && this.rightmenu.updateScroller();
} else if (activePane) { // lock active pane if no selected objects (ex. drawing)
for (var i=0; i<this._settings.length; i++) {
if (this._settings[i] && this._settings[i].panelId === activePane) {

View File

@ -193,7 +193,11 @@ define([
}
var props3d = this.chartProps ? this.chartProps.getView3d() : null;
this.ShowHideElem(!!props3d);
if ( this._state.is3D!==!!props3d ) {
this._state.is3D=!!props3d;
this.ShowHideElem(this._state.is3D);
}
if (props3d) {
value = props3d.asc_getRotX();
if ((this._state.X===undefined || value===undefined)&&(this._state.X!==value) ||
@ -775,6 +779,7 @@ define([
ShowHideElem: function(is3D) {
this.Chart3DContainer.toggleClass('settings-hidden', !is3D);
this.fireEvent('updatescroller', this);
},
onXRotation: function(field, newValue, oldValue, eOpts){

View File

@ -1650,8 +1650,10 @@ define([
this.TextOnlySettingsRegExp.toggleClass('hidden', !(type === Asc.c_oAscContentControlSpecificType.None && !!formTextPr) || this._state.FormatType!==Asc.TextFormFormatType.RegExp);
if (this.type !== type || this.isSimpleInsideComplex !== isSimpleInsideComplex || needUpdateTextControls || type == Asc.c_oAscContentControlSpecificType.CheckBox)
this.showHideControls(type, formTextPr, specProps, isSimpleInsideComplex);
if (this.type !== type || this.isSimpleInsideComplex !== isSimpleInsideComplex)
this.fireEvent('updatescroller', this);
this.type = type;
this._state.isSimpleInsideComplex = isSimpleInsideComplex;
this.isSimpleInsideComplex = isSimpleInsideComplex;
this._state.internalId = this.internalId;
}

View File

@ -261,16 +261,17 @@ define([
me.api = api;
var _fire_editcomplete = function() {me.fireEvent('editcomplete', me);};
var _isEyedropperStart = function (isStart) {this._isEyedropperStart = isStart;};
var _updateScroller = function () {me.updateScroller();};
this.paragraphSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this));
this.headerSettings.setApi(api).on('editcomplete', _fire_editcomplete);
this.imageSettings.setApi(api).on('editcomplete', _fire_editcomplete);
this.chartSettings.setApi(api).on('editcomplete', _fire_editcomplete);
this.chartSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('updatescroller', _updateScroller);
this.tableSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this));
this.shapeSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this));
this.textartSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this));
this.shapeSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
this.textartSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
if (this.mergeSettings) this.mergeSettings.setApi(api).on('editcomplete', _fire_editcomplete);
if (this.signatureSettings) this.signatureSettings.setApi(api).on('editcomplete', _fire_editcomplete);
if (this.formSettings) this.formSettings.setApi(api).on('editcomplete', _fire_editcomplete);
if (this.formSettings) this.formSettings.setApi(api).on('editcomplete', _fire_editcomplete).on('updatescroller', _updateScroller);
},
setMode: function(mode) {

View File

@ -2131,6 +2131,7 @@ define([
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {

View File

@ -1390,6 +1390,7 @@ define([
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {

View File

@ -109,8 +109,10 @@ define([
var panel = this._settings[type].panel;
var props = this._settings[type].props;
if (props && panel)
if (props && panel) {
panel.ChangeSettings.call(panel, (type==Common.Utils.documentSettingsType.Signature) ? undefined : props);
this.rightmenu.updateScroller();
}
}
Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
@ -233,6 +235,7 @@ define([
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props);
else
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel);
(active !== currentactive) && this.rightmenu.updateScroller();
}
}
@ -356,6 +359,7 @@ define([
if (settingsType !== Common.Utils.documentSettingsType.Paragraph) {
this.rightmenu.SetActivePane(settingsType, true);
this._settings[settingsType].panel.ChangeSettings.call(this._settings[settingsType].panel, this._settings[settingsType].props);
this.rightmenu.updateScroller();
}
},

View File

@ -180,7 +180,10 @@ define([
}
var props3d = this.chartProps ? this.chartProps.getView3d() : null;
this.ShowHideElem(!!props3d);
if ( this._state.is3D!==!!props3d ) {
this._state.is3D=!!props3d;
this.ShowHideElem(this._state.is3D);
}
if (props3d) {
value = props3d.asc_getRotX();
if ((this._state.X===undefined || value===undefined)&&(this._state.X!==value) ||
@ -790,6 +793,7 @@ define([
ShowHideElem: function(is3D) {
this.Chart3DContainer.toggleClass('settings-hidden', !is3D);
this.fireEvent('updatescroller', this);
},
onXRotation: function(field, newValue, oldValue, eOpts){

View File

@ -223,16 +223,18 @@ define([
},
setApi: function(api) {
var me = this;
this.api = api;
var fire = function() { this.fireEvent('editcomplete', this); };
var _isEyedropperStart = function (isStart) {this._isEyedropperStart = isStart;};
var _updateScroller = function () {me.updateScroller();};
this.paragraphSettings.setApi(api).on('editcomplete', _.bind( fire, this));
this.slideSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this));
this.imageSettings.setApi(api).on('editcomplete', _.bind( fire, this));
this.chartSettings.setApi(api).on('editcomplete', _.bind( fire, this));
this.chartSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('updatescroller', _updateScroller);
this.tableSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this));
this.shapeSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this));
this.textartSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this));
this.shapeSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
this.textartSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
if (this.signatureSettings) this.signatureSettings.setApi(api).on('editcomplete', _.bind( fire, this));
},
@ -310,6 +312,13 @@ define([
Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
},
updateScroller: function() {
if (this.scroller) {
this.scroller.update();
this.scroller.scrollTop(0);
}
},
txtParagraphSettings: 'Text Settings',
txtImageSettings: 'Image Settings',
txtTableSettings: 'Table Settings',

View File

@ -1993,6 +1993,7 @@ define([
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {

View File

@ -1851,6 +1851,7 @@ define([
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {

View File

@ -140,8 +140,10 @@ define([
var panel = this._settings[type].panel;
var props = this._settings[type].props;
if (props && panel)
if (props && panel) {
panel.ChangeSettings.call(panel, (type==Common.Utils.documentSettingsType.Signature) ? undefined : props, this._state.wsLock, this._state.wsProps);
this.rightmenu.updateScroller();
}
}
Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
},
@ -322,6 +324,7 @@ define([
else
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel);
this._openRightMenu = false;
(active !== currentactive) && this.rightmenu.updateScroller();
}
}
@ -407,6 +410,7 @@ define([
if (settingsType !== Common.Utils.documentSettingsType.Paragraph) {
this.rightmenu.SetActivePane(settingsType, true);
this._settings[settingsType].panel.ChangeSettings.call(this._settings[settingsType].panel, this._settings[settingsType].props, this._state.wsLock, this._state.wsProps);
this.rightmenu.updateScroller();
}
},

View File

@ -145,7 +145,10 @@ define([
chartSettings = isChart ? this.api.asc_getChartObject(true) : null, // don't lock chart object
props3d = chartSettings ? chartSettings.getView3d() : null;
this.ShowHideElem(isChart, !!props3d);
if ( this.isChart!==isChart || this._state.is3D!==!!props3d ) {
this.ShowHideElem(isChart, !!props3d);
}
this._state.is3D=!!props3d;
this.disableControls(this._locked);
if (this.api && props){
@ -1046,6 +1049,7 @@ define([
this.SparkTypesContainer.toggleClass('settings-hidden', isChart);
this.SparkPointsContainer.toggleClass('settings-hidden', isChart);
this.Chart3DContainer.toggleClass('settings-hidden', !isChart || !is3D);
this.fireEvent('updatescroller', this);
},
ShowCombinedProps: function(type) {

View File

@ -258,13 +258,15 @@ define([
},
setApi: function(api) {
var me = this;
this.api = api;
var _isEyedropperStart = function (isStart) {this._isEyedropperStart = isStart;};
var _updateScroller = function () {me.updateScroller();};
this.paragraphSettings.setApi(api);
this.imageSettings.setApi(api);
this.chartSettings.setApi(api);
this.shapeSettings.setApi(api).on('eyedropper', _.bind(_isEyedropperStart, this));
this.textartSettings.setApi(api).on('eyedropper', _.bind(_isEyedropperStart, this));
this.chartSettings.setApi(api).on('updatescroller', _updateScroller);
this.shapeSettings.setApi(api).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
this.textartSettings.setApi(api).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
this.tableSettings.setApi(api);
this.pivotSettings.setApi(api);
this.cellSettings.setApi(api).on('eyedropper', _.bind(_isEyedropperStart, this));
@ -348,6 +350,13 @@ define([
Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
},
updateScroller: function() {
if (this.scroller) {
this.scroller.update();
this.scroller.scrollTop(0);
}
},
txtParagraphSettings: 'Paragraph Settings',
txtImageSettings: 'Image Settings',
txtShapeSettings: 'Shape Settings',

View File

@ -2011,6 +2011,7 @@ define([
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {

View File

@ -1844,6 +1844,7 @@ define([
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.fireEvent('updatescroller', this);
},
setLocked: function (locked) {