readium-shared-js icon indicating copy to clipboard operation
readium-shared-js copied to clipboard

Reflowable document viewport gets clipped when enlarged (CSS columns)

Open danielweck opened this issue 9 years ago • 11 comments

Originally posted here: http://idpf.org/forum/topic-2430

By http://idpf.org/users/elania Elania (Alex)

" When I have a book open and the new window is fullscreen, a little bit of the left-hand side text is cut off. It's still technically readable, but it makes it much more difficult and is very annoying.

It doesn't do this if I make the screen small enough, but if I have to have it in a separate window, I want to at least have it as large as possible. "

readium error

danielweck avatar May 05 '15 08:05 danielweck

This is also reproducible with the current release (0.18 in master) on OSX with SmokeTestFXL.epub

rkwright avatar May 06 '15 15:05 rkwright

@rkwright on a fixed-layout (pre-paginated) spine item, or a reflowable document?

danielweck avatar May 06 '15 15:05 danielweck

I have been able to reproduce only in fixed layout. Reflowable (in my limited testing) seems fine.

rkwright avatar May 06 '15 15:05 rkwright

I have the same issue, my workaround is to change layout to document. Unfortunately doing this only displays a single page, however it least the page is not cropped.

theWhiteFox avatar Jun 07 '15 13:06 theWhiteFox

Some people in my company have the same issue but I haven't be able to observe it on my own laptop (MacBook Air).

johanpoirier avatar Jun 08 '15 07:06 johanpoirier

I located the bug.

The column width is computed with a Math.round():

  • https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L623
  • https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L645

And when we compute the page offset, we use the rounded value of the column width: https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L456

I think of 2 solutions:

  • do not round the columnWidth value and round the pageOffset value instead
  • store in paginationInfo the exact value: paginationInfo.exactColumnWidth

Any thoughts?

johanpoirier avatar Jun 09 '15 15:06 johanpoirier

To those of you following this discussion thread, @johanpoirier kindly looked into this rounding issue, and has run some tests: https://github.com/readium/readium-shared-js/pull/188#issuecomment-110725956

danielweck avatar Jun 11 '15 12:06 danielweck

More screenshots from @thiagoeec here: https://github.com/readium/readium-js-viewer/issues/344

danielweck avatar Jul 11 '15 07:07 danielweck

Still we are facing this issue, is there any update on this issue...

untitled

vamsundar avatar Aug 10 '15 07:08 vamsundar

Oh I re-opened this one, and wrote comments: https://github.com/readium/readium-shared-js/issues/37

They look like the same issue to me.

jccr avatar Aug 10 '15 15:08 jccr

Similar (identical) issue? https://github.com/readium/readium-shared-js/issues/283

danielweck avatar Jul 22 '16 17:07 danielweck