fix toggles

This commit is contained in:
nikita_bartoshuk
2026-01-21 23:46:42 +03:00
parent ab4f28dd09
commit eb390d2fc0
2 changed files with 11 additions and 0 deletions

View File

@ -246,6 +246,7 @@ define([
onMultiplePages: function (pressed) {
if (this.api) {
this.api.zoomCustomMode();
this.api.SetMultipageViewMode(pressed);
this.statusbar.fireEvent('pages:multiplechanged', [pressed]);
}
@ -258,6 +259,10 @@ define([
_onZoomChange: function (percent, type) {
this.statusbar.btnZoomToPage.toggle(type == 2, true);
this.statusbar.btnZoomToWidth.toggle(type == 1, true);
if (type === 1 || type === 2 && this.statusbar.btnMultiplePages.pressed) {
this.api.SetMultipageViewMode(false);
this.statusbar.btnMultiplePages.toggle(false);
}
$('.statusbar #label-zoom').text(Common.Utils.String.format(this.zoomText, percent));
if (!this._isDocReady) return;
var value = type == 2 ? -1 : (type == 1 ? -2 : percent);

View File

@ -287,6 +287,7 @@ define([
onMultiplePages: function (pressed) {
if (this.api) {
this.api.zoomCustomMode();
this.api.SetMultipageViewMode(pressed);
this.view.fireEvent('pages:multiplechanged', [pressed]);
}
@ -300,6 +301,11 @@ define([
btn.toggle(type === 1, true);
});
if (type === 2 || type === 1 && this.view.btnMultiplePages.pressed) {
this.api.SetMultipageViewMode(false);
this.view.btnMultiplePages.toggle(false);
};
this.setZoomValue(percent);
this._state.zoomValue = percent;