-
Notifications
You must be signed in to change notification settings - Fork 1.5k
When in addEdgeMode() the click network.on('click', ... does not fire. #3131
Comments
Here is a jsbin with When I add your example code, it doesn't work. I have added it in the |
Thank you for your answer. I just noticed it has the same problem! When you click and drag to draw the edge the click event is not fired... I need to know the starting node of the edge that I am drawing... |
I edited the jsbin and if you notice if you start drawing an edge no event is fired. Even if you change to |
Aha, so the issue is not with the |
Thank you! I am really struggling here to get the starting node! In fact I think that an |
There's no way I can offer you a workaround for this. The code needs to be changed in There are two points in there in which Are you using the github repo BTW? Or just a ready-made |
I am using an ready-made vis.js... I can try to look at the code of manipulation system and try to implement this feature. But I can't promise anything |
No, you don't have to. It's just that it would make it easier to give you a quick solution. Otherwise you would have to wait for the next release. I know what to do here; I'll think of how I can get you something that works, quickly. |
Ok! I am not in a rush! When will it be the next release? I can actually use the github repo but in the final version of my project I would need the ready-made Thanks a lot for your work! |
Next release is not planned yet; that decision is made when there is enough new stuff to put into it.
My pleasure! Gratitude is good currency for open-source work. |
Thank you! Tell me something when you have any news! |
Generating a In
There is no need to add a specific Now, there is a slight problem with the definition of the events. From the documentation, the event that is passed in:
The problem is that, when adding a new edge, there are no selected nodes and edges. Well, technically there are, but in the strict sense these are the nodes and edges selected already in the network. This has nothing to do with the node being dragged from. Also, note that the edge that is being added does not even exist in the network at the time of dragging. In order to avoid confusion with the matter, I prefer to just not pass the selected nodes and edges through (last parameter in There is another action available in I can't solve this, so I'm just going to ignore editing edges for this issue. |
I have adjusted the jsbin for these changes, see if this is to your liking. In the drag events, the id of current node is determined with method |
I can not test the version in jsbin. There is something wrong with the vis imported. |
I see what you mean. The external resources take an eternity to download. I'm quite positive that the vis is in order; I think this is a glitch on |
I manage to solve the problem in jsbin and now I am using your vis.js version in my project! It solves my problem :) can I still use this version until the next release? |
If you put the script like this I changed from |
TIL github url's but still not working for me. I think the internet has the hiccups.
OK, great. Yeah, you could use that version. I'd prefer it if you download it to your machine and use it locally. |
Ok I will do that! I would apreciate if you let me know when the next release is out! Many thanks again! |
I could promise I will do that, but I know myself and I will likely forget. Rather than depending entirely on me, please check periodically yourself. Update: Sorry to say the fix didn't make it into latest release |
How we can show details on clicking any node.? |
I activate the addEdgeMode() and then when I click in the canvas nothing ``happens.
Although this works when the addEdgeMode is not active.
Thank you in advance :)
The text was updated successfully, but these errors were encountered: