[SSE] Set minimum zoom value to 10%

This commit is contained in:
Julia Radzhabova 2022-07-25 13:29:50 +03:00
parent 0417cd8dd3
commit 77365fe93d
3 changed files with 6 additions and 4 deletions

View file

@ -321,7 +321,7 @@ SSE.ApplicationController = new(function(){
if (api){
var f = Math.ceil(api.asc_getZoom() * 10)/10;
f -= .1;
!(f < .5) && api.asc_setZoom(f);
!(f < .1) && api.asc_setZoom(f);
}
});

View file

@ -1857,7 +1857,7 @@ define([
if (delta < 0) {
factor = Math.ceil(factor * 10)/10;
factor -= 0.1;
if (!(factor < .5)) {
if (!(factor < .1)) {
this.api.asc_setZoom(factor);
}
} else if (delta > 0) {
@ -1897,7 +1897,7 @@ define([
if (!this.api.isCellEdited) {
factor = Math.ceil(this.api.asc_getZoom() * 10)/10;
factor -= .1;
if (!(factor < .5)) {
if (!(factor < .1)) {
this.api.asc_setZoom(factor);
}

View file

@ -154,7 +154,9 @@ define([
},
applyZoom: function (value) {
var val = Math.max(25, Math.min(500, value));
var val = Math.max(10, Math.min(500, value));
if (this._state.zoomValue === val)
this.view.cmbZoom.setValue(this._state.zoomValue, this._state.zoomValue + '%');
this.api.asc_setZoom(val/100);
Common.NotificationCenter.trigger('edit:complete', this.view);
},