Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Network - blurEdge not always fired #1718

Closed
rjbriody opened this issue Mar 8, 2016 · 7 comments
Closed

Network - blurEdge not always fired #1718

rjbriody opened this issue Mar 8, 2016 · 7 comments

Comments

@rjbriody
Copy link

rjbriody commented Mar 8, 2016

Hi.

I noticed that the blurEdge event is not always fired. To reproduce, load the following example, open the console, and go nuts w/ the mouse. Eventually you will see that the blur and hover count diverge. It seems to get worse when 2 edges are very close to each other.

https://jsfiddle.net/njpazbuz/

Interestingly, the edge thickness is always correct.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Mar 9, 2016

I don't suppose you can pinpoint which mouse movement causes this?

@rjbriody
Copy link
Author

rjbriody commented Mar 9, 2016

I'm not sure what you mean by "mouse movement". Are there different types of mouse movements or are you asking if I can determine when a blurEdge is missed? If the later, then that might be possible since other things are happening correctly - i.e. title popups disappear and edge thickness returns to normal.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Mar 9, 2016

I meant the latter, what exactly causes the event to miss? Since all you do
to trigger it is move the mouse there has to be a specific combination of
movements (on edge, on node, off node, off edge etc) to cause it.

Regards

On Wed, Mar 9, 2016 at 1:20 PM, bobb notifications@github.com wrote:

I'm not sure what you mean by "mouse movement". Are there different types
of mouse movements or are you asking if I can determine when a blurEdge is
missed? If the later, then that might be possible since other things are
happening correctly - i.e. title popups disappear and edge thickness
returns to normal.


Reply to this email directly or view it on GitHub
#1718 (comment).

@rjbriody
Copy link
Author

rjbriody commented Mar 9, 2016

Got it. Let me add some additional logging and checks.

@rjbriody
Copy link
Author

rjbriody commented Mar 9, 2016

There is a pattern. It appears in a few ways but seems like the same thing.

The first example occurs w/ a very simple "2 node 1 edge" graph. Here is a sequence of the events:
hoverEdge
hoverNode (but notice that we didn't blur from the previous hoverEdge yet)
blurNode
hoverEdge
blurEdge

The second example uses a graph with 2 nodes and 2 edges. The sequence of events is:
hoverEdge
hoverEdge (but again, notice that we didn't blur from the previous hoverEdge yet)
blurEdge

The last example is the worst case. The sequence of events is:
hoverEdge
hoverNode
blurNode

This case is the worst because the blurEdge event is never fired. In the previous cases I can detect that multiple edges have been hovered and clean things up in a single blurEdge call. That is not possible when blurEdge is never fired.

It seems like it should not be possible to hover a new element without blurring the last. Maybe this is intentional? If so, then it seems like burEdge should be fired multiple times and include a {edge: edgeID} event.

Here is a fiddle that might be helpful https://jsfiddle.net/4zt6a71m/1/.

@parthms
Copy link

parthms commented Jun 21, 2016

Any updates on this?

@mojoaxel
Copy link
Member

Should be fixed with #2124

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants