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

Fix hover on orphan node #50

Closed
wants to merge 2 commits into from

Conversation

Tav0
Copy link

@Tav0 Tav0 commented Feb 11, 2019

fix #51

@micahstubbs
Copy link
Member

thanks for the contribution @Tav0! will take a look at this

@@ -5,7 +5,8 @@ var nodes = new vis.DataSet([
{ id: 2, label: 'Node 2', title: 'I have a popup!' },
{ id: 3, label: 'Node 3', title: 'I have a popup!' },
{ id: 4, label: 'Node 4', title: 'I have a popup!' },
{ id: 5, label: 'Node 5', title: 'I have a popup!' }
{ id: 5, label: 'Node 5', title: 'I have a popup!' },
{ id: 6, label: 'Node 6', title: 'I have a popup!' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tav0, so I tested this new example data on master (without the fix) and I am not able to reproduce the bug. can you tell me more about when you see the bug (see hover broken)?

Could you perhaps add another example to the PR that will show the bug if the fix is not present?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some more details on what I tried in this issue #51

@Tav0
Copy link
Author

Tav0 commented Feb 27, 2019

Hi @micahstubbs sorry for the delay, here it is a gif of the issue. (master branch)
example-bug

@micahstubbs
Copy link
Member

nice, thanks for adding the example! I'll take a look at this, hopefully sometime this week.

@micahstubbs
Copy link
Member

micahstubbs commented Mar 8, 2019

hi @Tav0, so checked out your branch

git checkout -b Tav0-fix/hover-orphan-node master
git pull https://github.com/Tav0/visjs-network.git fix/hover-orphan-node

and saw this:

  1. the popup appears on the orphan node 6 added to the example (this works on master too)
  2. the popup appears on the connected node 5 (this works on master too)
  3. the popup does not appear on the newly added new node (this is broken on master too)

50-orphan-node-hover--1-640px

@micahstubbs
Copy link
Member

@Tav0 could you take another look, and see if you can produce an example where 3) works too?

@micahstubbs
Copy link
Member

it looks to me like when we mouse over the new node, the hidePopup event is fired too soon. It fires before we mouse out from the new node.
50-hidepopup-event-fired-too-soon

@micahstubbs
Copy link
Member

contrast this with the behavior of Node 6, where the hidePopup event is not fired until we mouse out. This is the expected behavior. this and all previous examples are taken from a local server running the code in this PR.

50-node-6-no-hidepopup-event-until-mouse-out

@micahstubbs
Copy link
Member

@Tav0 let's keep at this - I think we are close to a solution here 😄 📈

@micahstubbs
Copy link
Member

will close this PR, since I was not able to reproduce the fix.

@Tav0 please do re-open this PR if you would like to help us verify the fix 😄

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

Successfully merging this pull request may close these issues.

hover is broken on an orphan node
2 participants