-
Notifications
You must be signed in to change notification settings - Fork 102
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
Images not resizing to fit the screen in scrollview #64
Comments
See candidate fix in feature branch: UPDATE: feature branch now deleted, but commit preserved as reference (proposal: scroll view acts like regular scrolling webpage => no arbitrary resize-to-fit imposed by reading system, just application of authored CSS styles). Code diff: I do not think that this is a fully-satisfactory solution though, as many books I tried have image width/height either set via CSS or attributes, and the application of maximum values irrespective of aspect ratio sometimes produces unexpected / undesirable results. Furthermore, some images do not resize when opening the page for the first time, only when resizing the viewport. In fairness though, the same problem already exists with the columnized paginated view: ...so one could argue that the behaviour should be consistent across all types of reflowable views, and that we should apply the same image resizing algorithm to the scroll view? |
See also: #45 |
See also: |
Shared utility function between scroll and column-paginated views: Feature branch: https://github.com/readium/readium-shared-js/tree/feature/scroll_img_resize UPDATE: feature branch now deleted, but commit preserved as reference (proposal: scroll view acts like regular scrolling webpage => no arbitrary resize-to-fit imposed by reading system, just application of authored CSS styles). |
I created a test file and verified this bug in the current build of the Chrome Extension. The file is here: |
We'll need to add this for svg's as well in your feature branch. It's just a matter of adding 'svg' to the jquery selector we use. |
Originally posted by @vanisuthamathi
readium/readium-js#57
Steps to Reproduce:
scroll: "scroll-doc"
}); in the Epub reader view
Read any article containing big image sizes like 600x511, 600X300 and etc.,
Images are not resizing to fit the screen as shown in the attached image.Observation:
Note: We have fixed in our application by adding css properties to the image tags after the content documents are loaded
$(imgTags).css('max-width', '98%');
$(imgTags).css('max-height', '98%');
Please fix in the readium library
The text was updated successfully, but these errors were encountered: