philogb / jit

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web
http://thejit.org
Other
1.51k stars 297 forks source link

Tooltip hover doesn't work if labels have stuff inside #113

Closed thedustyrover closed 12 years ago

thedustyrover commented 12 years ago

Tooltips are made to display on mouseenter events on the labels. However if the label has content (I've added some divs inside of mine), mouseenter events will be picked up by these child divs, and they fail the isLabel() check used to show the tooltip.

I made a modification to the isLabel check to loop through its parents to see if any of them pass the check - if so, then that element is part of the label and the check is passed. Not sure if there are other better solutions.

thedustyrover commented 12 years ago

Nevermind! I was working off an older version of the library and I see that a similar fix has already been implemented in the latest