gordonwatts / snowmass-loi-words

4 stars 1 forks source link

fix: Get tooltip working and clean up the code a little. #1

Closed kratsg closed 4 years ago

kratsg commented 4 years ago

Tooltip was originally inserted as a child element of svg/g which means it will never show (as it is not an svg element). Instead, append it directly to the body and then update on mouseover, rather than via mousemove - to make the code a bit more responsive and reduce the number of event calls and DOM updates.

Also clean up some of the code and use some CSS to simplify the d3 a little bit as well.