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

Imager.getNaturalWidth(image) #105

Merged
merged 6 commits into from
Oct 25, 2014
Merged

Imager.getNaturalWidth(image) #105

merged 6 commits into from
Oct 25, 2014

Conversation

thom4parisot
Copy link
Contributor

Static method for better code coverage.

closes #99

benjambles and others added 4 commits October 25, 2014 19:10
IE10 returns undefined for naturalWidth until the image supplied in the src has loaded, rather than the 0 defined in the spec. The 'naturalWidth' in (new Image) gets around this.

It also adds a width and height to the lazy loaded images, that the this.gif.removeAttribute fix further up doesn't fix. I've removed the attributes again once the image has had its src swapped and this fixes the issue.

Lazy Loading now works perfectly in IE10!
The function is now a public static method to get proper test coverage as it is quite critical to detect images width.
thom4parisot pushed a commit that referenced this pull request Oct 25, 2014
Imager.getNaturalWidth(image)
@thom4parisot thom4parisot merged commit 43f9f6a into master Oct 25, 2014
@thom4parisot thom4parisot deleted the fix-99 branch October 25, 2014 18:49
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.

None yet

2 participants