depviz
depviz copied to clipboard
Rapid prototyping for the dot code
Would be nice to be able to have a "rapid prototyping" for the dot code, or its generation. Basically, a special window we can show and edit the generated dot on a text area directly on the page, and when we edit it, we can re-render the network with the new code. That way it will help us tweak the dot code to get the network to look like we want. (i want to play with the dot parameters quickly to get what we want in various graphs)
I envision this being a togglable thing. fine if it's a developer secret, enabled via executing something like window.__debugDot()
on the console.
On Wed, Nov 30, 2016 at 05:20:22AM -0800, Juan Benet wrote:
Basically, a special window we can show and edit the generated dot on a text area directly on the page…
So the expected workflow is:
- Render a graph as usual.
- Dump the dot behind (1) into a textarea, and start reading from that textarea instead of the usual graphviz() output 1.
That means all you can do is position nodes and edges. The nodes themselves would be frozen on the transition from 1 → 2.
I think it may be easiest to do this in a dev environment (npm start
) by editing Graph.graphviz
, saving Graph.js
, and letting the tooling rebuild/reload your view. If you use a dummy URL (e.g. http://localhost:3000/#/http/dummy/jbenet/depviz/) you get fast graph loading without hitting the network. The benefit of this approach would be that you can do it now (no dev time). The drawback would be that you need to update DummyHost.js
to have the relationship that's being laid out poorly.