Ignore ReadingDirection in UpDown readermode
This commit is contained in:
parent
bced614481
commit
58dbaf8f51
1 changed files with 13 additions and 1 deletions
|
|
@ -1283,8 +1283,19 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls the correct prev- or nextPage method based on the direction, readingDirection, and readerMode
|
||||||
|
*
|
||||||
|
* readingDirection is ignored when readerMode is Webtoon or UpDown
|
||||||
|
*
|
||||||
|
* KeyDirection.Right: right or bottom click
|
||||||
|
* KeyDirection.Left: left or top click
|
||||||
|
* @param event
|
||||||
|
* @param direction
|
||||||
|
*/
|
||||||
handlePageChange(event: any, direction: KeyDirection) {
|
handlePageChange(event: any, direction: KeyDirection) {
|
||||||
if (this.readerMode === ReaderMode.Webtoon) {
|
// Webtoons and UpDown reading mode should not take ReadingDirection into account
|
||||||
|
if (this.readerMode === ReaderMode.Webtoon || this.readerMode === ReaderMode.UpDown) {
|
||||||
if (direction === KeyDirection.Right) {
|
if (direction === KeyDirection.Right) {
|
||||||
this.nextPage(event);
|
this.nextPage(event);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1292,6 +1303,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (direction === KeyDirection.Right) {
|
if (direction === KeyDirection.Right) {
|
||||||
this.readingDirection === ReadingDirection.LeftToRight ? this.nextPage(event) : this.prevPage(event);
|
this.readingDirection === ReadingDirection.LeftToRight ? this.nextPage(event) : this.prevPage(event);
|
||||||
} else if (direction === KeyDirection.Left) {
|
} else if (direction === KeyDirection.Left) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue