nylen / d3-process-map

Web application to illustrate the relationships between objects in a process using d3.js.
MIT License
416 stars 196 forks source link

Possible to connect a vertex to itself? #8

Open plarem opened 9 years ago

plarem commented 9 years ago

Is it possible to show a connection from a vertex to vertex itself? I want to display an ontology and I will use the d3-process-map. But now you cannot connect a vertex to itself.

nylen commented 9 years ago

There's no functionality in the project to do that. It's certainly possible to add it, but I don't have time to work on it right now.

SVG paths only support cubic beziers, which is probably not enough degrees of freedom to make a nice-looking curve from one edge of the rectangle to another. You'd want to splice together 2 or more bezier curves, and make sure the code to show dependencies works with self-references like this.

Here's an example implementation of higher-order curves: http://www.jasondavies.com/animated-bezier/

nylen commented 9 years ago

Reopening as this would be a nice enhancement.