Book Polishing (#639)

* Downgraded ExCSS, the new version has a regression that breaks toCss().

* Cleaned up the next/prev disabling to work more reliably.

Fixed an issue with double arrow on next not disappearing after hitting last page then going back one page.

* Cleaned up some css padding on the side nav progress bar

* Remove the ability to save

* Updated colors of nav bar and side drawer to be darker to separate them from the reader

* Fixed a missed element

* Removed dead code

* Removed TODO, it can't be changed

* Refactored bookmarking on the book progress to have pinpoint accuracy for remembering scroll position. Now will choose the top line on the page.

* Fixed a style issue when applying dark mode from light mode in book reader
This commit is contained in:
Joseph Milazzo 2021-10-05 17:42:43 -07:00 committed by GitHub
parent 323bddb752
commit 2727dfa7b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 91 additions and 164 deletions

View file

@ -127,4 +127,14 @@ export class UtilityService {
return Breakpoint.Desktop;
}
isInViewport(element: Element, additionalTopOffset: number = 0) {
const rect = element.getBoundingClientRect();
return (
rect.top >= additionalTopOffset &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
}