caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

Uncaught TypeError: Cannot read property 'defaultView' of undefined #159

Closed jeremy-saidani closed 10 years ago

jeremy-saidani commented 10 years ago

Hi !

I try to animate layers by I get this javascript error : Uncaught TypeError: Cannot read property 'defaultView' of undefined. I can't get the line of code because it's in jquery-1.11.0.min.js:3 ...

It's happened randomly, I have a for loop to animate some layers. Sometimes it's works, sometimes not. I checked in printing the layer name to animate before $canvas.animateLayer(name, {}), and even by getting the layer with $canvas.getLayer(name) and do a animateLayer with it and every time the layer name is good. I think it's happened when I try to animate layers I already animate few line of code before, but I'm not sure because sometimes yes, sometimes no ...

I spend to much time on it so if you have an idea where I can looking for that can be great !

PS : sorry for y english I'm french !

caleb531 commented 10 years ago

Well, considering the uncanny nature of this supposed bug, I would very much appreciate if you could try to reproduce the issue in the jCanvas sandbox. Or, you could also provide me with a code sample that reproduces the issue—something I can work with—that would be great too.

Thanks very much, Caleb

jeremy-saidani commented 10 years ago

Ok I'll send you an email with more delais ! Be in touch !

jeremy-saidani commented 10 years ago

Ok, I think I solved my problem : In did an animateLayer on a circle and I put width and height to 0 to remove it. But a circle has a radius ... I know it and I thought I tried this solution. I'm not sure at 100% but for the moment it works