-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Tooltip Position is wrong if useMaxWidth = false and you scroll #542
Labels
Type: New Shape
Request for new shape
Comments
Hi changing to this worked tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.scrollingElement.scrollTop + 'px'); |
This was referenced Dec 30, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you set useMaxWidth to false and render a large graph where you able to scoll.
The Tooltip position is wronmg if you scroll left/right or up/down
I solved this by setting the CSS style for tooltip to 'fixed' and changed the added scroll top position in JS
from:
tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
to:
tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + 'px');
The text was updated successfully, but these errors were encountered: