Leonidas-from-XIV / floatinghands

A watch, as a CoffeeScript jQuery plugin. Or somethin'
3 stars 0 forks source link

read canvas width/height from the fallback element using jQuery, not attributes #13

Closed watchdesigner closed 13 years ago

watchdesigner commented 13 years ago

As said, when creating the canvas, the plugin should not expect the attributes width and height to be there in the fallback element, because that requires it to be an image, otherwise those attributes would not be valid. Better use the jQuery functions .width() and .height().

At almost the same time (that's why I'm writing it here rather than filing yet another ticket, sorry) could you please copy the ID attribute of the fallback element to the newly created Canvas element. That will help if one wants to access the canvas in code later for some reason.

Leonidas-from-XIV commented 13 years ago

Yep, applied both changes.