Skip to content

Tankōbon / lib/reader-navigation / scrollEdgeAfterTurn

Function: scrollEdgeAfterTurn() ​

scrollEdgeAfterTurn(previousPage, page): "top" | "bottom"

Defined in: lib/reader-navigation.ts:49

The edge of a zoomed page the view lands on after a page turn: the top when moving toward the end of the book (index goes up), the bottom when going back, so the reader continues from where they were instead of keeping the previous page's scroll position.

Parameters ​

previousPage ​

number

page ​

number

Returns ​

"top" | "bottom"