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:
parent
323bddb752
commit
2727dfa7b9
8 changed files with 91 additions and 164 deletions
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue