theproductiveprogrammer/flipbook-viewer

maximum dimensions

Closed this issue · 2 comments

Hi, great project.

Maybe I missed something obvious but I couldn't see a way to set the flipbook to use the maximum height and width of the viewport. I could only see a way to se absolute dimensions in pixels.

Hi @brianteeman

Thanks for the appreciation! ❤️

To set the flipbook to the height and width of the window's client area (the viewport) would look something like:

const opts = {
  width: window.innerWidth,
  height: window.innerHeight,
}

flipbook(book, 'div-id', opts, (err, viewer) => ...

I hope that helps. Apologies for the late response. Was on holiday.

thanks