Open naugtur opened 9 years ago
Makes good sense. Would be great if someone had time to hack a prototype of this.
That's what I plan to do, but I might need you to point me to where the fixed position data is.
Dumping the coordinates in local storage would be just fine. Maybe a JSON blob for each "report", so we would need to generate a unique id for each report.
I get it, but I was asking where to look for the data. If you could point me to a method that fetches the coords of nodes that would be a nice kickstart for my work.
I've got a proof of concept. I know how to do that. Now the question is: what should be the unique-enough id of a graph? My initial idea was to use a hash of all module names, but then you lose the layout if dependencies change. So the code that generates html should say what the identification is. Project folder maybe?
Yeah, I would hash the folder-path, and use that as the key?
Moving a node makes it stick in one place.
Maybe there's a way to store that information,
JSON.stringify
and put in the local storage. From there there's only one step to printing the string to console and allowing user to put it in a file which would be loaded and interpreted every time the graph is drawn, so you can have some of the graph nodes maintain order between browsers and machines (assuming the file goes to the repository as documentation)