Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Resize images to fit a reflowable column or scrollable page view. #173

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

jccr
Copy link
Contributor

@jccr jccr commented Mar 31, 2015

This adds a new approach for resizing images to fit a reflowable column or scrollable page view.

  • It now more actively changes the max-width, max-height values for images, before it would just run once when the iframe doc loaded. Now it runs at every pagination change.
  • max-height and max-width values are now calculated and are no longer static CSS percentage based values.
  • For scrollable docs the max-height value is not modified.
  • It now tries to preserve the original aspect ratio of the resized images.

This attempts to fix the following issues:

Juan Corona added 2 commits July 30, 2015 13:37
Conflicts:
	js/views/reflowable_view.js
	js/views/scroll_view.js
@coler-j
Copy link

coler-j commented Jan 10, 2019

This is beautiful and it works like a charm for me. I was reviewing the many many issues related to scrollable image resizing, and this is the only fix that worked for me. Makes more sense to pull it into a helper too for re-usability. Great work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants