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

Bug in Tooltip example #85

Closed
jjackevans opened this issue Aug 27, 2022 · 1 comment
Closed

Bug in Tooltip example #85

jjackevans opened this issue Aug 27, 2022 · 1 comment

Comments

@jjackevans
Copy link

Hi,

There's a small issue in the tooltip example.
If a tooltip is created on a node and then a pan/zoom operation is performed, if the user hovers over the same node, it will position the tooltip relative to the old position (before the pan/zoom).

I have fixed this simply by setting the targetNodeId to null on the node:pointerout event.

  "node:pointerout": () => {
    tooltipOpacity.value = 0 // hide
    targetNodeId.value = null
  },
@dash14
Copy link
Owner

dash14 commented Aug 29, 2022

Hi @jjackevans,
Thank you for reporting the problem in the example!
In my environment, when targetNodeId was set to null, the tooltip position was momentarily displayed as (0, 0) when the pointer was removed from the node, so it was modified to use watch to calculate the position.
Similarly, the Tooltip example in Edge has been fixed.
https://dash14.github.io/v-network-graph/examples/event.html#tooltip

Thank you for your support!

@dash14 dash14 closed this as completed Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants