Misc Bugs (#510)
* Don't show bookmark context actionable for books * Fixed an issue where when adding a collection tag, the logic wouldn't assume the tag already existed in DB and would reset it. * After editing a series on library page, ensure we refresh collection tags. * Reload recently added section after changing a series * Moved all Stat logger events to Debug * Refactored scroll logic into a single service to keep the code consistent.
This commit is contained in:
parent
914c6f9349
commit
786fa146fb
13 changed files with 92 additions and 52 deletions
22
UI/Web/src/app/scroll.service.ts
Normal file
22
UI/Web/src/app/scroll.service.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ScrollService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
get scrollPosition() {
|
||||
return (window.pageYOffset
|
||||
|| document.documentElement.scrollTop
|
||||
|| document.body.scrollTop || 0);
|
||||
}
|
||||
|
||||
scrollTo(top: number) {
|
||||
window.scroll({
|
||||
top: top,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue