react-tooltip
react-tooltip copied to clipboard
style position rounding
Hey, thanks for the package!
I run into an issue about placement with active browser page zooming. Positioning is off by a few pixels (which is not very noticable, but breaks some add-on behaviour we have). But it made me wonder, why does react-tooltip appear to truncate numbers when assigning element's position (style).
The fix for #146 involved adding parseInt
as.. a means to do rounding? I wonder, can we replace this by proper rounding, or is there some advantage to parseInt
over Math.round
?
sorry, did not mean to send that stub of an issue, but apparently "enter" means "publish". will edit it in a sec.
Hi, @LennartSpitzner can you check if this still being a problem with the latest published version, please?
If yes, can you please do PR?
Thanks!
@danielbarion finally I was able to test this again, sorry for the delay.
Short answer: I could not reproduce any problem related to tooltip positioning when zooming any longer. Thanks!
(#743 simplified our code significantly without any need to reproduce rounding logic on our end. To check I reverted to an older version of our code that did not use #743, but I still could not reproduce any problem either. So all good.)