youcef92 / flotr

Automatically exported from code.google.com/p/flotr
0 stars 0 forks source link

mouse tracking box - display style should be changeable #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Mouse tracking box is white on black, with no option to change this. This
was not suitable for me, so I have made some small modifications to the
code. They preserve back compatibility so there should be no problem. I
would love to see them incorporated in the trunk if possible.
(I apologize if this is not a proper wa to send patches - I don't know the
proper procedure and this fix is small anyway...)

I added this to Flotr.defaultOptions.mouse:
  boxStyle:"opacity:0.7;background-color:#000;color:#fff;padding:2px
8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;" 

And then in function hit() I changed line:
  elStyle = 'opacity:0.7;background-color:#000;...white-space:nowrap;';
to:
  elStyle = s.mouse.boxStyle+';display:none;position:absolute;';

Bonus: user can change boxStyle to empty string and use .flotr-mouse-value
CSS class. I didn't set it that way though because it would break back
compatibility. 

I hope it gets in trunk - if you need anything else to do it please let me
know.

Enjoy!

Original issue reported on code.google.com by anz...@gmail.com on 11 Sep 2009 at 8:59

GoogleCodeExporter commented 8 years ago
Yes, that's a good suggestion, I'll add it to the trunk.

Original comment by fabien.menager on 12 Sep 2009 at 9:33

GoogleCodeExporter commented 8 years ago
If not okay, please reopen

Original comment by peter....@solide-ict.nl on 22 Jun 2010 at 1:26