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

Add support for different aspect ratios/Fix crash caused by using reserved keyword class without quotes #77

Merged
merged 4 commits into from
Oct 18, 2014

Conversation

maxee
Copy link
Contributor

@maxee maxee commented Sep 27, 2014

This PR patches the following issues:

  • Add support for different aspect ratios of thumbnail and full-size image
  • Fix crash caused by using the reserved keyword class without quotes. This causes a crash/error and stops any further js execution at least in IE8 (although IE8 does not support transforms, this bug needs to be fixed, other versions/browsers may be affected as well.)

This patch adds support for different aspect ratios of thumbnail and
full-size image. The script now adapts automatically to the ratio of the
full-size image.
Although IE8 does not support transforms, using the keyword class
without quotes crashes the whole javascript execution when using IE8
(other versions might be affected as well). Using quotes fixes this
issue.
@maxee maxee changed the title Add support for different aspect ratios Add support for different aspect ratios/Fix crash caused by using reserved keyword class without quotes Sep 28, 2014
@andreasd
Copy link

hi!

thanks - the different aspect ratio was exactly what I was looking for. Testing it right now :)

It seems that 43f7627 does not take the viewPortfill into account. Images with different ratios seem to have more unused space around them, but I have not yet tested this any further.

@maxee
Copy link
Contributor Author

maxee commented Oct 10, 2014

@andreasd
Yep that could be. I didn't really test how much of the viewport images with different ratios use. The behavior seemed ok for me. Didn't have time to test it, but I will take a look at it.

@andreasd
Copy link

I found some bugs in this implementation (mainly typos), see comments on 43f7627

Fixed typos, increased size of the example image (viewport testing).
Thanks to @andreasd for typo finding
@maxee
Copy link
Contributor Author

maxee commented Oct 14, 2014

Thanks @andreasd,
I fixed the typos.

Additionally I made a few viewport tests afterwards. I think everything is working as it should:

Viewport 1.0:
viewport-1-landscape
viewport-1-portrait

Viewport 0.5:
viewport-0 5-land
viewport-0 5-port

@terrymun
Copy link
Owner

Thanks for the work, guys! Was off the grid for a few weeks for personal reasons, but thanks for your input.

It was never the intention to support image resolutions of different sizes, but you guys made it possible. I'll include your names in the credits when the next version is published (should be on the horizon, by the weekend or so).

terrymun added a commit that referenced this pull request Oct 18, 2014
Add support for different aspect ratios/Fix crash caused by using reserved keyword class without quotes
@terrymun terrymun merged commit 4a1c23c into terrymun:master Oct 18, 2014
@terrymun terrymun self-assigned this Oct 18, 2014
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.

None yet

3 participants