From 1d6612ea78822faaf8415948ee506e4922a4ad88 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 24 Jun 2022 01:51:50 +0300 Subject: [PATCH 1/2] Fix Bug 57734 --- .../main/app/controller/Navigation.js | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Navigation.js b/apps/documenteditor/main/app/controller/Navigation.js index 6eb7b8105..8437e974f 100644 --- a/apps/documenteditor/main/app/controller/Navigation.js +++ b/apps/documenteditor/main/app/controller/Navigation.js @@ -163,8 +163,31 @@ define([ arr[0].set('name', this.txtBeginning); arr[0].set('tip', this.txtGotoBeginning); } - this.getApplication().getCollection('Navigation').reset(arr); - this.onChangeOutlinePosition(this._navigationObject.get_CurrentPosition()); + + var me = this; + var store = this.getApplication().getCollection('Navigation');//.reset(arr); + store.reset(arr.splice(0, 50)); + + this._currentPos = this._navigationObject.get_CurrentPosition(); + + function addToPanel() { + if (arr.length<1) { + me.panelNavigation.viewNavigationList.scroller && me.panelNavigation.viewNavigationList.scroller.update({alwaysVisibleY: true}); + if (me._currentPos>-1 && me._currentPos-1 && me._currentPos Date: Fri, 24 Jun 2022 01:53:28 +0300 Subject: [PATCH 2/2] Refactoring --- apps/documenteditor/main/app/controller/Navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/controller/Navigation.js b/apps/documenteditor/main/app/controller/Navigation.js index 8437e974f..fb97d8707 100644 --- a/apps/documenteditor/main/app/controller/Navigation.js +++ b/apps/documenteditor/main/app/controller/Navigation.js @@ -165,7 +165,7 @@ define([ } var me = this; - var store = this.getApplication().getCollection('Navigation');//.reset(arr); + var store = this.getApplication().getCollection('Navigation'); store.reset(arr.splice(0, 50)); this._currentPos = this._navigationObject.get_CurrentPosition();