krzysu / flot.tooltip

tooltip plugin for wonderful Flot plotting library
https://github.com/krzysu/flot.tooltip
187 stars 153 forks source link

$(window).innerWidth() not working in some deployments #79

Closed RoboterHund closed 10 years ago

RoboterHund commented 10 years ago

I could only get the plugin to work after manually changing the updateTooltipPosition method from $(window).innerWidth() to $(window).width(). I also changed $(window).innerHeight() to $(window).height(). The current version causes jQuery to throw one TypeError exception per hover event. I read this: api.jquery.com/innerwidth/ and applied the changes accordingly.

I'd like to suggest a tooltipOptions param to select between the two and/or a docs update. Thanks

RoboterHund commented 10 years ago

Whether this error occurs depends on which jQuery version is used. For example, it fails with jQuery 1.4.1

krzysu commented 10 years ago

Hi, thanks for pointing this out. Pull request with a fix is welcomed.

RoboterHund commented 10 years ago

I made pull request #81 Sorry, I'm new to git and made bad pull request - #80 :(