Merge pull request #2573 from ONLYOFFICE/fix/Bug-63912

[PE] bug 63912
This commit is contained in:
Julia Radzhabova
2023-09-07 14:54:54 +03:00
committed by GitHub

View File

@ -68,6 +68,7 @@ define([
zoom_type: undefined,
zoom_percent: undefined
};
this._isZoomRecord = (Common.localStorage.getItem("pe-settings-zoom") != -3);
},
events: function() {
@ -118,7 +119,7 @@ define([
this.api = api;
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this._onZoomChange, this));
this.api.asc_registerCallback('asc_onTextLanguage', _.bind(this._onTextLanguage, this));
this.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(function (){this._isDocReady = true;}, this));
this.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(function (){this._isZoomRecord = true;}, this));
this.statusbar.setApi(api);
},
@ -183,7 +184,7 @@ define([
if (this._state.zoom_percent !== percent) {
$('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, percent));
this._state.zoom_percent = percent;
if(!this._isDocReady) return;
if(!this._isZoomRecord ) return;
Common.localStorage.setItem('pe-last-zoom', percent);
}
},