Merge pull request #1371 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-12-01 12:32:57 +03:00 committed by GitHub
commit 96aaa1fb69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View file

@ -393,6 +393,7 @@ define([
this.appOptions.fileChoiceUrl = this.editorConfig.fileChoiceUrl; this.appOptions.fileChoiceUrl = this.editorConfig.fileChoiceUrl;
this.appOptions.saveAsUrl = this.editorConfig.saveAsUrl; this.appOptions.saveAsUrl = this.editorConfig.saveAsUrl;
this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs;
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop';
}, },
onExternalMessage: function(msg) { onExternalMessage: function(msg) {
@ -518,6 +519,7 @@ define([
if (params.asc_getRights() !== Asc.c_oRights.Edit) if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = this.permissions.review = false; this.permissions.edit = this.permissions.review = false;
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.trialMode = params.asc_getLicenseMode();
this.appOptions.isBeta = params.asc_getIsBeta(); this.appOptions.isBeta = params.asc_getIsBeta();
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);

View file

@ -280,7 +280,7 @@ SSE.ApplicationController = new(function(){
if (api){ if (api){
var f = Math.floor(api.asc_getZoom() * 10)/10; var f = Math.floor(api.asc_getZoom() * 10)/10;
f += .1; f += .1;
f > 0 && !(f > 2.) && api.asc_setZoom(f); f > 0 && !(f > 5.) && api.asc_setZoom(f);
} }
}); });
$('#id-btn-zoom-out').on('click', function () { $('#id-btn-zoom-out').on('click', function () {

View file

@ -1725,7 +1725,7 @@ define([
} else if (delta > 0) { } else if (delta > 0) {
factor = Math.floor(factor * 10)/10; factor = Math.floor(factor * 10)/10;
factor += 0.1; factor += 0.1;
if (factor > 0 && !(factor > 2.)) { if (factor > 0 && !(factor > 5.)) {
this.api.asc_setZoom(factor); this.api.asc_setZoom(factor);
} }
} }
@ -1744,7 +1744,7 @@ define([
if (!this.api.isCellEdited) { if (!this.api.isCellEdited) {
var factor = Math.floor(this.api.asc_getZoom() * 10)/10; var factor = Math.floor(this.api.asc_getZoom() * 10)/10;
factor += .1; factor += .1;
if (factor > 0 && !(factor > 2.)) { if (factor > 0 && !(factor > 5.)) {
this.api.asc_setZoom(factor); this.api.asc_setZoom(factor);
} }

View file

@ -121,7 +121,7 @@ define([
case 'up': case 'up':
var f = Math.floor(this.api.asc_getZoom() * 10)/10; var f = Math.floor(this.api.asc_getZoom() * 10)/10;
f += .1; f += .1;
!(f > 4.) && this.api.asc_setZoom(f); !(f > 5.) && this.api.asc_setZoom(f);
break; break;
case 'down': case 'down':
f = Math.ceil(this.api.asc_getZoom() * 10)/10; f = Math.ceil(this.api.asc_getZoom() * 10)/10;

View file

@ -317,7 +317,7 @@ define([
if ( btn == 'up' ) { if ( btn == 'up' ) {
var _f = Math.floor(this.api.asc_getZoom() * 10)/10; var _f = Math.floor(this.api.asc_getZoom() * 10)/10;
_f += .1; _f += .1;
if (_f > 0 && !(_f > 2.)) if (_f > 0 && !(_f > 5.))
this.api.asc_setZoom(_f); this.api.asc_setZoom(_f);
} else { } else {
_f = Math.ceil(this.api.asc_getZoom() * 10)/10; _f = Math.ceil(this.api.asc_getZoom() * 10)/10;