goat1000 / TagCanvas

HTML5 canvas-based tag cloud
240 stars 81 forks source link

TagCanvas constructor fails on backbone based application. #5

Closed ConnectedReasoning closed 9 years ago

ConnectedReasoning commented 9 years ago

function TagCanvas(cid,lctr,opt) { var i, p, c = doc.getElementById(cid), cp = ['id','class','innerHTML'], raf;

if the doc does not yet have the element, as is the case when attempting to render a view in backbone, then the tagCanvas fails because there is not element in the doc

goat1000 commented 9 years ago

If the canvas doesn't exist, TagCanvas can't draw on it. Try starting TagCanvas after the element has been added to the DOM.

ConnectedReasoning commented 9 years ago

That was it thank you. I moved beyond that error by starting it after calling the backbone render method. I still havent got it to work so but the specific error that motivated me to write this issue is resolved. I'll be more specific if I open more, thanks