Просмотр исходного кода

Merge branch 'fix/Process.documenteditor_switch_page' into 'develop'

Merge of fix/Process.documenteditor_switch_page 板式文件切换双页在切换成双页,保留原来的显示百分比 to develop

See merge request o2oa/o2oa!1624
蔡祥熠 5 лет назад
Родитель
Сommit
7091083d95
1 измененных файлов с 14 добавлено и 1 удалено
  1. 14 1
      o2web/source/x_component_process_Xform/Documenteditor.js

+ 14 - 1
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -1681,7 +1681,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     },
     _singlePage: function(){
         //if (this.editMode) this._readFiletext();
-        this.zoom(1);
+
+        var scale = this.singlePageZoom || 1;
+        if( this.singlePageZoom && this.singlePageZoom.toInt() != 1 ){
+            this.isScale = true;
+            this.scale = this.singlePageZoom;
+            this.singlePageZoom = null;
+        }
+
+        this.zoom(scale);
         this._checkScale();
 
         var w = this.contentNode.getSize().x;
@@ -1752,6 +1760,11 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
 
     _doublePage: function(){
         if (this.editMode) this._switchReadOrEditInline();
+
+        if( this.zoomSelectAction ){
+            this.singlePageZoom = ( this.zoomSelectAction.options[this.zoomSelectAction.selectedIndex].value ).toFloat();
+        }
+
         this.zoom(1);
         this.createWaitSplitPage();
         window.setTimeout(function(){