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

[Network] self-loop edge not always show with 4.18 #2591

Closed
bthieurmel opened this issue Jan 17, 2017 · 8 comments
Closed

[Network] self-loop edge not always show with 4.18 #2591

bthieurmel opened this issue Jan 17, 2017 · 8 comments

Comments

@bthieurmel
Copy link

bthieurmel commented Jan 17, 2017

When network have "self-loop" edge (from = 1, to = 1), they are not always showed, depends of movement :
net2png

@Tooa
Copy link
Member

Tooa commented Jan 17, 2017

Can you provide a minimal example showing the problem via jsbin.com. Please also let us know how to reproduce the error using the example.

@bthieurmel
Copy link
Author

Short example : http://jsbin.com/fipaha/edit?html

Seems to be with dot shape. Edge from node 1 to node 1 is not always visibled (clicking Nodes / moving nodes, ....)

@Tooa Tooa added this to the Minor Release v4.19 milestone Jan 17, 2017
@Tooa
Copy link
Member

Tooa commented Jan 17, 2017

I can confirm this bug. It works with 4.17 and breaks in 4.18. Thus, it was introduced in 4.18 :(

@bthieurmel
Copy link
Author

Not only for dot, observed same bug with diamond. Don"t have test all shape...

@eymiha
Copy link
Contributor

eymiha commented Jan 17, 2017

For me, the issue can be seen:

• when opening the network, the link-to-self loop is missing... and then simply clicking on the canvas displays the loop.
• moving the node with the loop disappears the loop, then clicking on the canvas shows it again.

must be related to drawing that edge...

The code in network/modules/components/edges/util/EdgeBase.js lines 60, 61; 86, 87; and 101, 102 is where the loop circle is getting drawn... looks like _getCircleData is a potential culprit.

@bthieurmel
Copy link
Author

bthieurmel commented Jan 17, 2017

And moving others nodes without loop then loop flash

@eymiha
Copy link
Contributor

eymiha commented Jan 17, 2017

I've got a fix for this one... I'll be doing a PR shortly.

mojoaxel pushed a commit that referenced this issue Jan 25, 2017
#2595)

* self reference edge should now appear in all cases
* add checks for shape width being NaN to get correct circle data
* reorder resize arguments in Diamond, Dot and Star
@mojoaxel
Copy link
Member

mojoaxel commented Jan 25, 2017

@bthieurmel Thanks for reporting this!
fixed by @eymiha with #2595

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