Added 'scaling' option to omit image scaling (stretching) of images when the 'fit' and 'aspect' options are set #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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