mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-31 14:33:50 -04:00
Adding code to make sure bottom actionbar is applied on layout change (#1258)
This commit is contained in:
parent
bb791b7789
commit
92fb185f20
@ -818,7 +818,6 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
setupPage(part?: string | undefined, scrollTop?: number | undefined) {
|
setupPage(part?: string | undefined, scrollTop?: number | undefined) {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.scrollbarNeeded = this.readingHtml.nativeElement.clientHeight > this.reader.nativeElement.clientHeight;
|
|
||||||
|
|
||||||
// Virtual Paging stuff
|
// Virtual Paging stuff
|
||||||
this.updateWidthAndHeightCalcs();
|
this.updateWidthAndHeightCalcs();
|
||||||
@ -1099,6 +1098,9 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
updateWidthAndHeightCalcs() {
|
updateWidthAndHeightCalcs() {
|
||||||
this.windowHeight = Math.max(this.readingSectionElemRef.nativeElement.clientHeight, window.innerHeight);
|
this.windowHeight = Math.max(this.readingSectionElemRef.nativeElement.clientHeight, window.innerHeight);
|
||||||
this.windowWidth = Math.max(this.readingSectionElemRef.nativeElement.clientWidth, window.innerWidth);
|
this.windowWidth = Math.max(this.readingSectionElemRef.nativeElement.clientWidth, window.innerWidth);
|
||||||
|
|
||||||
|
// Recalculate if bottom action bar is needed
|
||||||
|
this.scrollbarNeeded = this.readingHtml.nativeElement.clientHeight > this.reader.nativeElement.clientHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleDrawer() {
|
toggleDrawer() {
|
||||||
@ -1193,6 +1195,9 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
// Remove any max-heights from column layout
|
// Remove any max-heights from column layout
|
||||||
this.updateImagesWithHeight();
|
this.updateImagesWithHeight();
|
||||||
|
|
||||||
|
// Calulate if bottom actionbar is needed. On a timeout to get accurate heights
|
||||||
|
setTimeout(() => {this.scrollbarNeeded = this.readingHtml.nativeElement.clientHeight > this.reader.nativeElement.clientHeight;});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateReadingDirection(readingDirection: ReadingDirection) {
|
updateReadingDirection(readingDirection: ReadingDirection) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user