arrows icon indicating copy to clipboard operation
arrows copied to clipboard

Added ability to create relationships

Open gallarotti opened this issue 12 years ago • 3 comments

I love your tool, I find it very useful to prepare graphs for blog posts about neo4j, but one thing I was missing was the ability to create new relationships, so I decided to fork your repo and add this piece of functionality. This was my first time forking a repo, so I am not sure if I am doing everything right. Also I didn't have too much time to test it, but it seems to be working fine.

I added an ID field to the nodes, so when you double click on them you can see the node ID.

screen shot 2014-01-09 at 14 19 02

Then, let's say you want to add a new relationship "R" between node 3 and node 5, all you have to do is click on the "+ relationship" button and enter 3 as the FROM node and 5 as the TO node.

screen shot 2014-01-09 at 14 19 24

I also added these fields in the edit relationship modal so you can change or move a relationship easily

screen shot 2014-01-09 at 14 19 56

gallarotti avatar Jan 09 '14 13:01 gallarotti

Sorry, I just realized that you had this "ring" thing going on already to create a new node with an attached relationship which also is smart enough to merge into an existing node on an overlap. Apologies for the pull request

gallarotti avatar Jan 09 '14 13:01 gallarotti

Hi there, thanks doing all this work. I'm sorry that there are zero instructions for how to use the tool - a lot of people have struggled to find the ring too, and mostly they only find it after I explain.

Does the current functionality meet your needs for creating relationships? If it does, I'll close this pull request. However, if you think you can explain how to use the 'ring' and can think of a good place to put such documentation in the GUI, then I'd gladly accept suggestions, or even another pull request!

apcj avatar Jan 09 '14 13:01 apcj

Up to you whether to include this extra way to add relationships or not. I like options, so I will continue to use my version if you decide not to pull the request, also because for some weird reason after a while that I use your tool things get out of whack (the mouse cursor and the nodes generated via the ring are off) and it becomes difficult to edit a graph. Also I will see if I can add a button to clear the localstore because otherwise I always have to use Chrome to do that.

gallarotti avatar Jan 09 '14 14:01 gallarotti