Skip to content
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 location when zooming in on image #388

Closed
vnijs opened this issue Sep 22, 2016 · 2 comments
Closed

tooltip location when zooming in on image #388

vnijs opened this issue Sep 22, 2016 · 2 comments
Labels
Type: New Shape Request for new shape

Comments

@vnijs
Copy link

vnijs commented Sep 22, 2016

Tooltips are working great. Very nice feature. One thing I noticed, however, is that when you zoom in on the image in the browser the tooltip is located farther and farther from the original element. Examples with normal view and zoomed attached below. Is there way around this perhaps?

Normal:
tooltop-location

Zoomed:
zoomed-tooltop-location

@vnijs
Copy link
Author

vnijs commented Dec 30, 2017

@ziyiwang's response to #542 seems to address the issue with tooltip placement after zooming and scrolling

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 + document.scrollingElement.scrollTop + 'px');

document.body.scrollTop seems to be zero no matter the extent of scrolling or zooming

@stale
Copy link

stale bot commented Jun 29, 2019

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.

@stale stale bot added the Type: New Shape Request for new shape label Jun 29, 2019
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
…yarn/develop/svelte-preprocess-4.9.5

chore(deps-dev): bump svelte-preprocess from 4.9.4 to 4.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Shape Request for new shape
Projects
None yet
Development

No branches or pull requests

1 participant