Skip to content
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

Added 'scaling' option to omit image scaling (stretching) of images when the 'fit' and 'aspect' options are set #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mweichert
Copy link

Added new option called 'scaling'. When this option is set to true, as well as the "fit" and "aspect" options, slides are never scaled (stretched). Instead, slides are always shrunk to fit into the container while maintaining the same aspect ratio.

I think it's common for users not to desire scaling, as it can make images blurry. With the scaling option, we can simulate Galleria's behavior when the maxScaleRatio option is used by setting the following options:

{
fit: true,
aspect: true.
scaling: false,
slideResize: false
}

I didn't add my changes to jquery.cycle.lite as I noticed that wpalmer's changes weren't there either.

Note, if you'd rather call the option "stretching" instead of "scaling" that's fine, as I wouldn't want it to be confused with interpolation algorithms.

Cheers,
Mike

…s well as the fit and aspect options, slides are never scaled (stretched). Instead, slides are always shrunk to fit into the container while maintaining the same aspect ratio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant