-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cover image on Chrome is not correctly sized #342
Comments
with reference to this thread. readium/readium-css#55 (comment) Readium-shared-js is processing below html from start.html differently causing the cover image to stretch.
Cover image is stretch in this book
As mentioned in the linked thread the readium-shared-js image processing code is not changed in years but we were using a very old readium (probably 3+ year old) where both these htmls were rendering the cover image perfectly without any stretching. Is there a way or configuration which can fix this issue for us somehow. We are testing on android small devices and this issue is very evident on handsets as well as on Tabs. |
The image stretching issue also exist in current version of android readiumSDK launcher. After further investigation into the readium-shared-js code, found that the image resizing is not taking effect on mobile devices, since the height was used in % readium-shared-js/js/views/reflowable_view.js Lines 988 to 1018 in 7f245be
In the above code, if the % for height is replaced by vh then the images get resized perfectly on mobile device. Current code This trick will resolve the issues of image resizing/stretching on android device. However this trick may not work in chrome as chrome has issues with 'vh' so its a mobile device specific solution. Thought it would be useful for someone facing similar problem. Thanks |
When viewing a book that has a cover image, on firefox the image occupies exactly the height of the viewport (height 100% of viewport). On chrome, the same book's cover has a width of 100%; so the image occupies several pages.
The text was updated successfully, but these errors were encountered: