Fix it so that pins show up on IE. #27

Merged
merged 1 commit into from May 11, 2012

Projects

None yet

2 participants

Contributor

In pinry.js, reference is made to image.width and image.height properties, neither of which exist. They are used to compute the target height of the image, by computing the aspect ratio image.width/image.height. Unfortunately, undefined/undefined yields NaN, and so we end up writing "height='NaN'" into the HTML.

It looks like webkit (at least chrome) ignores it when the height attribute on an img element is set to NaN, but Internet Explorer treats it as zero. That's why it didn't look broken on other browsers.

@DeCarabas DeCarabas Fix it so that pins show up on IE.
In pinry.js, reference is made to image.width and image.height
properties, neither of which exist. They are used to compute the
target height of the image, by computing the aspect ratio
image.width/image.height. Unfortunately, undefined/undefined yields
NaN, and so we end up writing "height='NaN'" into the HTML.

It looks like webkit (at least chrome) ignores it when the height
attribute on an <img /> element is set to NaN, but Internet Explorer
treats it as zero. That's why it didn't look broken on other browsers.
ea7ce9a
Owner

It's something I planned on implementing and didn't get to, thanks for doing this!

@overshard overshard merged commit cf7cd7c into overshard:master May 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment