Skip to content

Refit enhancer

Install @prose-reader/enhancer-refit and set refit.viewportFit when you create the reader, to narrow the viewport of a scrolled book to a tablet width.

This enhancer gives you a convenient way to let the user refit the viewport for better reading experience. For example by reducing the viewport width to see more pages at once on scrolling mode.

Terminal window
npm install @prose-reader/enhancer-refit @prose-reader/core rxjs

Connect the enhancer to your reader:

import { refitEnhancer } from "@prose-reader/enhancer-refit"
const createAppReader = refitEnhancer(createReader)
const reader = createAppReader({
manifest,
refit: {
viewportFit: "tablet"
}
})
The demo's viewport fit setting at a maximum width of 32%, with the comic narrowed behind it
The same setting at 76%, with the comic wider