I have been sitting on this code for too long, so I think it would fit in Sage's philosophy to release early, to include it in the next version of Sage. Here is my current version:
http://www.math.uiuc.edu/~rkirov2/sage/graph_editor.zip it contains a diff patch for Sage devel and two files which need to go "$SAGE_ROOT/local/notebook/javascript/graph_editor" (create that folder). Sage/local is not under mercurial so I can't add it to the patch. now to get the graph editor just type (in notebook): sage: G = graphs.PetersenGraph() sage: graph_editor(G) comments: 1) Update button is really ungraceful but i couldn't figure out how to send the data behind the scene to the Sage server (as the server so far is made to communicate only with the cells). So now it just dumps the data in the cell it was called and leaves it to the user to execute the update. 2)The graph_editor opens in an iframe, so if you grad a node out of the whole frame, it stops tracking it (this can be probably fixed with some major JS hack). However, now it detects you left the iframe and returns the vertex to its original position. 3) This works only for simple graphs for now. any suggestions, comments, especially code corrections are welcome Rado --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---