From 1e99bee8898b6b9ca01c4f38802b227477e8853c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Jan 2018 14:35:35 +0300 Subject: [PATCH] [DE] Table of content settings: scroll list of styles to the first header. --- .../main/app/view/TableOfContentsSettings.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/TableOfContentsSettings.js b/apps/documenteditor/main/app/view/TableOfContentsSettings.js index 472d9302c..ca0ab8aca 100644 --- a/apps/documenteditor/main/app/view/TableOfContentsSettings.js +++ b/apps/documenteditor/main/app/view/TableOfContentsSettings.js @@ -242,6 +242,12 @@ define([ this.levelsContainer.toggleClass('hidden', newValue); if (this._needUpdateStyles) this.synchronizeLevelsFromOutline(); + this.stylesList.scroller.update({alwaysVisibleY: true}); + setTimeout(function(){ + var rec = me.stylesLevels.findWhere({checked: true}); + if (rec) + me.stylesList.scrollToRecord(rec); + }, 10); } }, this)); @@ -427,8 +433,13 @@ define([ this.spnLevels.setDisabled(disable_outlines || new_start>1 ); } this.stylesLevels.reset(styles); - if (this.spnLevels.isDisabled()) + if (this.spnLevels.isDisabled()) { this.radioStyles.setValue(true); + this.stylesList.scroller.update({alwaysVisibleY: true}); + var rec = this.stylesLevels.findWhere({checked: true}); + if (rec) + this.stylesList.scrollToRecord(rec); + } // Show Pages is always true when window is opened this._originalProps = (props) ? props : new Asc.CTableOfContentsPr();