krzysu / flot.tooltip

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

handle missing cssClass cleanly #138

Closed RangerRick closed 8 years ago

RangerRick commented 8 years ago

I have a case where the flot graph and the config it's pointing to is being torn down in such a way that the tooltipOptions.cssClass property no longer exists by the time getDomElement() is called.

This checks for its existence and returns a dummy div if it does not exist, to keep from throwing an undefined error.