Zoom

API available here .zoom

How it works

Zooming can be achieved by different means and we provide a ready to use API. The simplest way to zoom on the reader is by manipulating the viewport. By applying transformation to it, you can virtually move the viewport around without affecting the navigation. This is a good strategy to prevent hard to manage side effects.

Internally, prose will use the absolute viewport (without transformation) for most of its calculation regarding navigation, pagination etc. We will consider the relative viewport (with transformation) for visible elements though so things that are visible to the user will be loaded for example.

Zoom & Thumbnails

Zooming is not constrained to one direction. By zooming out (scale < 1) you can achieve a "thumbnails" effect:

This is not recommended to use this mode as a mean to "refit" the reading experience. You can use this Refitenhancer to do so.

Controlled vs Scrollable

Controlled contents (regular books) behave differently than scrollable content (eg: webtoon). Visit the section Page Turn Modefor more information. When in scrollable mode, the user can keep reading normally and not be constrained within bounds. This is because scrollable books usually takes the entire space and offer continuous reading without page turn animations.

The internal implementation is also very much different due to both modes using different navigators. Basically controlled will manipulate viewport 3d axis while scrollable content will manipulate scroll offset on the navigator.

Last updated

Was this helpful?