The cachedDraw function is throwing an error

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by James Crandall on 2nd July 2014
     RG.cachedDraw = function (obj, id, func)
         //If the cache entry xists - just copy it across to the main canvas
         if (!RG.cache[id]) {

             RG.cache[id] = {};
             RG.cache[id].object = obj;
             RG.cache[id].canvas = $('<canvas></canvas>').attr({

Cannot read property attr of null

Everything was working fine. Maybe I hosed something. I deleted the library and reinstalled the one from March and the error continued which seems really strange.

Thanks for this great library.

Posted by Richard on 3rd July 2014
It's saying that this:


is null. So jQuery isn't creating the canvas tag.So maybe you're not including jQuery any more or are including something that overwrites the $ function.

Posted by James Crandall on 3rd July 2014
Ironically, the addition of a script that supposedly avoids conflicts caused the conflict.

Posted by Richard on 3rd July 2014
What was the script and what was it doing?


Add a reply

« Back to message list