wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

Responsiveness JS doesn't respect original width and height attributes #133

Closed danielbachhuber closed 8 years ago

danielbachhuber commented 8 years ago

image

I'd expect the JavaScript to respect the original proportions. Instead, it falls back to the defaults.

I'm not sure why we went with the data attributes originally. If the data attributes aren't set, we should use the width and height attributes instead.

danielbachhuber commented 8 years ago

Here's where I initially committed the code: https://github.com/fusioneng/fusion-theme/commit/902a69587277f95983056574d6eb70751e114d5e

There's no mention of why I went with data attributes. I think we can defer to the data attributes if they're set, but fall back to width and height attributes otherwise.

danielbachhuber commented 8 years ago

:ship: