Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Fit or Fill the image for images smaller than the container #15

Open
jeacott opened this issue Jun 12, 2014 · 0 comments
Open

Fit or Fill the image for images smaller than the container #15

jeacott opened this issue Jun 12, 2014 · 0 comments

Comments

@jeacott
Copy link

jeacott commented Jun 12, 2014

Hi there,
I'm trying to use this plugin with images that are smaller than the target container. (avatars in a container big enough to manipulate)
I'd like to scale up the images so that they are properly adjusted to fit/fill by the smallest dimension, and are never able to shrink smaller than the container.
the adjustToContainer method, only seems to cater to the case where the image is larger, otherwise it always calculates a scale of 1, where a scale of >1 is what I want to lock in as a minimum (I think).
what's the best way to 'fill' an image into the container so that the image always consumes the entire container, and cannot ever be dragged/zoomed to show background?

Cheers

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

No branches or pull requests

1 participant