Fix getVisibleElements helper in RTL-locales

This commit is contained in:
Mohamed 2020-10-09 16:20:06 +02:00
parent 88f72d6b1c
commit b7b048e36c
3 changed files with 30 additions and 11 deletions

View file

@ -1006,6 +1006,10 @@ class BaseViewer {
: this._scrollMode === ScrollMode.HORIZONTAL;
}
get _isContainerRtl() {
return getComputedStyle(this.container).direction === "rtl";
}
get isInPresentationMode() {
return this.presentationModeState === PresentationModeState.FULLSCREEN;
}
@ -1055,7 +1059,8 @@ class BaseViewer {
this.container,
this._pages,
true,
this._isScrollModeHorizontal
this._isScrollModeHorizontal,
this._isScrollModeHorizontal && this._isContainerRtl
);
}