-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isMouseOver Calculated Incorrectly for path Elements, Leading to Closing Powertip #135
Comments
I created a jsfiddle where you can see this bug: |
The JSFiddle example you supplied is using an outdated version of the library, version 1.1.0. SVG support was not added until version 1.2.0. Here is a fork of your fiddle using version 1.2.0: https://jsfiddle.net/stevenbenner/Lv6t1bvq/ It no longer shows the unexpected closing behavior. However, it does seem to put the tooltip in an unexpected place. |
It's still disappearing for me. Try moving your mouse below the middle of the svg (see updated fiddle): |
Actually, try this jsfiddle: https://jsfiddle.net/e6217g42/2/ |
What browser are you using? I was able to reproduce the issue in Chrome. I cannot repro in Firefox or IE. It seems that This may be a very complicated fix because I have to handle rotation. I'll investigate. |
Yes Chrome. It does seem complicated, my Monkey hack only works for non-rotated paths, and only does height, not width. You may want to consider turning off the desync check for path elements. |
Powertip's
isMouseOver
function does not properly calculate the height of SVG elements, which causes it to determine that the mouse is not over an object when it really is.The reason for this is that
getBoundingClientRect
does not include the height ofstroke-width
in its calculation. I fixed this with the following monkey-hack:The text was updated successfully, but these errors were encountered: