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
from

Conversation

Projects
None yet
1 participant

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

Michael Weichert Added new option called 'scaling'. When this option is set to true, a…
…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.
81bed99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment