mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 14:54:04 +08:00
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user