readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
549 stars 186 forks source link

image splitting into two parts in horizontal modes #744

Closed mohan9000 closed 3 years ago

mohan9000 commented 3 years ago

Issue: when the user selecting the horizontal layout mode(double /single) view the reader splitting the images if the image is bigger one it is splitting the image into two parts and showing the image next . This is happening based on the window height , we need that image in single and it has to adjust the size and width into signle side

mohan9000 commented 3 years ago

is there any solution to prevent to stop images to split in reflowable content

mohan9000 commented 3 years ago
cpi_img1

please find the attachment of screenshot for the issue

danielweck commented 3 years ago

Hello, in the so-called "Readium 2" project there is a standalone library to manage document styling overrides. The problem you describe was addressed using CSS constructs which you might be able to "backport" to readium-shared-js:

https://github.com/readium/readium-css/issues/55 https://github.com/readium/readium-css/issues/50

This is the code you would need to adjust accordingly: https://github.com/readium/readium-shared-js/blob/15412a0b8b9c98d060885fa98584a8205dce6a8d/js/views/reflowable_view.js#L989-L1018

CC @JayPanoz

mohan9000 commented 3 years ago

@danielweck tnx for the solution it helped me to solve my issue

llemeurfr commented 3 years ago

And if such a solution can be proposed as a pull request to the project, this will be certainly welcome for other users of the library.

danielweck commented 3 years ago

I agree, could you please share your solution? (presumably, a patch to readium-shared-js?)