Paginator: add scroll amount option

This commit is contained in:
John Factotum
2023-08-11 08:14:30 +08:00
parent 9b366ad1c4
commit 44c5eca4e9
2 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -335,12 +335,12 @@ export class View extends HTMLElement {
console.error(`Could not get ${target}`)
}
}
async prev() {
await this.renderer.prev()
async prev(distance) {
await this.renderer.prev(distance)
this.history.replaceState(this.lastLocation.cfi)
}
async next() {
await this.renderer.next()
async next(distance) {
await this.renderer.next(distance)
this.history.replaceState(this.lastLocation.cfi)
}
goLeft() {