Directly call _setCurrentPageNumber
when updating the Scroll/Spread modes in BaseViewer
Given that the `_updateScrollMode`/`_updateSpreadMode` methods are "private", there's no particular reason to not just directly call `_setCurrentPageNumber`.
This commit is contained in:
parent
2e38b7d00b
commit
e16e072cb3
@ -1086,7 +1086,7 @@ class BaseViewer {
|
||||
if (this._currentScaleValue && isNaN(this._currentScaleValue)) {
|
||||
this._setScale(this._currentScaleValue, true);
|
||||
}
|
||||
this.scrollPageIntoView({ pageNumber, });
|
||||
this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);
|
||||
this.update();
|
||||
}
|
||||
|
||||
@ -1146,7 +1146,7 @@ class BaseViewer {
|
||||
if (!pageNumber) {
|
||||
return;
|
||||
}
|
||||
this.scrollPageIntoView({ pageNumber, });
|
||||
this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);
|
||||
this.update();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user