kreynolds / RaphaelJS-Infobox

Wrapper for placing dynamic HTML on a RaphaelJS Canvas
http://blog.insidesystems.net/embedding-arbitrary-html-into-raphaeljs
Other
15 stars 5 forks source link

TypeError #3

Closed TheCodeBuccaneer closed 12 years ago

TheCodeBuccaneer commented 12 years ago

Using the following script:

Gives the following error:

Uncaught TypeError: Cannot read property 'top' of null Infobox.updateraphaeljs-infobox.js:30 (anonymous function)raphaeljs-infobox.js:23 f.event.dispatchjquery-1.7.min.js:3 f.event.add.h.handle.ijquery-1.7.min.js:3 f.event.triggerjquery-1.7.min.js:3 f.fn.extend.triggerjquery-1.7.min.js:3 e.extend.eachjquery-1.7.min.js:2 e.fn.e.eachjquery-1.7.min.js:2 f.fn.extend.triggerjquery-1.7.min.js:3 e.extend.readyjquery-1.7.min.js:2 c.addEventListener.C

Any ideas how I can solve this?

Thanks in advance

TheCodeBuccaneer commented 12 years ago

Problem is solved, Raphael canvas was not assigned to a div.

kreynolds commented 12 years ago

Right, jQuery does not fetch offsets for SVG elements directly inside the body for some reason. I will add a note to that effect to the Readme.