Skip to content

Commit

Permalink
Merge pull request NYPL-Simplified#31 from d-i-t-a/fixes/next-previous
Browse files Browse the repository at this point in the history
minor fixes for next previous scroll
  • Loading branch information
aferditamuriqi authored May 5, 2020
2 parents d447429 + b4f2de4 commit 5d85cdc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
43 changes: 31 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@d-i-t-a/reader",
"version": "1.1.0",
"version": "1.0.11",
"description": "A viewer application for EPUB files.",
"repository": "https://github.com/d-i-t-a/R2D2BC",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/navigator/IFrameNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ export default class IFrameNavigator implements Navigator {
const position: Locator = {
href: this.publication.getAbsoluteHref(this.previousChapterLink.href),
locations: {
progression: 0
progression: 1
},
type: this.previousChapterLink.type,
title: this.previousChapterLink.title
Expand Down
2 changes: 1 addition & 1 deletion src/views/ScrollingBookView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class ScrollingBookView implements ContinuousBookView {
private getScreenHeight(): number {
const windowTop = window.scrollY;
const windowBottom = windowTop + window.innerHeight;
return windowBottom - windowTop
return windowBottom - windowTop - 100
}

public readonly name = "scrolling-book-view";
Expand Down

0 comments on commit 5d85cdc

Please sign in to comment.