Refactoring navigation panel
This commit is contained in:
parent
4c36aee79f
commit
2ff9f8537f
|
@ -57,10 +57,7 @@ define([
|
||||||
'Navigation': {
|
'Navigation': {
|
||||||
'show': function() {
|
'show': function() {
|
||||||
if (!this.canUseViwerNavigation) {
|
if (!this.canUseViwerNavigation) {
|
||||||
var obj = me.api.asc_ShowDocumentOutline();
|
me.api.asc_ShowDocumentOutline();
|
||||||
if (!me._navigationObject)
|
|
||||||
me._navigationObject = obj;
|
|
||||||
me.updateNavigation();
|
|
||||||
} else {
|
} else {
|
||||||
if (me.panelNavigation && me.panelNavigation.viewNavigationList && me.panelNavigation.viewNavigationList.scroller)
|
if (me.panelNavigation && me.panelNavigation.viewNavigationList && me.panelNavigation.viewNavigationList.scroller)
|
||||||
me.panelNavigation.viewNavigationList.scroller.update({alwaysVisibleY: true});
|
me.panelNavigation.viewNavigationList.scroller.update({alwaysVisibleY: true});
|
||||||
|
@ -131,6 +128,9 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updateNavigation: function() {
|
updateNavigation: function() {
|
||||||
|
if (!this._navigationObject)
|
||||||
|
this._navigationObject = this.api.asc_GetDocumentOutlineManager();
|
||||||
|
|
||||||
if (!this._navigationObject) return;
|
if (!this._navigationObject) return;
|
||||||
|
|
||||||
var count = this._navigationObject.get_ElementsCount(),
|
var count = this._navigationObject.get_ElementsCount(),
|
||||||
|
@ -168,6 +168,9 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updateChangeNavigation: function(index) {
|
updateChangeNavigation: function(index) {
|
||||||
|
if (!this._navigationObject)
|
||||||
|
this._navigationObject = this.api.asc_GetDocumentOutlineManager();
|
||||||
|
|
||||||
if (!this._navigationObject) return;
|
if (!this._navigationObject) return;
|
||||||
|
|
||||||
var item = this.getApplication().getCollection('Navigation').at(index);
|
var item = this.getApplication().getCollection('Navigation').at(index);
|
||||||
|
|
Loading…
Reference in a new issue