Murali-group / GraphSpace

The interactive graph sharing website.
http://graphspace.org
GNU General Public License v2.0
30 stars 41 forks source link

Cola layout option #296

Closed YoonjinTKim closed 6 years ago

YoonjinTKim commented 7 years ago

Added cola layout into layout options. Click "#cola" will automatically layout the graph with original cola settings, and "#cola_setting" will direct to the #colaOptions HTML page to change the variables including randomizing, edge length, node space, fit, and flow options. The original setting is with {randomize:false, edge length = 45, node space = 5, fit = true, flow = undefined}. There are global variables in graphs_page.js to control and save the settings for cola options.

Added path to cola.js path to templates/base.html, templates/graphs/index.html, templates/graphs/index.html, reset.html, and templates/group/index.html.( , )

Create new navigation bar cola_option.html file with randomizing, edge length, node space, randomize, fit, and x -axis, and y-axis flows.

In graph.js file, set global variables cola_edge_length, cola_node_space, cola_fit, cola_flow, and cola_randomize to store the settings. automatic_layout will call the initial settings for initial settings when the cola layout is first called.

image

![image](https://user-images.githubusercontent.com/9061404/28798309-1b883ea2-7612-11e7-9a72-ea786c60da9b.png) ![image](https://user-images.githubusercontent.com/9061404/28798357-449d24ce-7612-11e7-99dc-72f0ba325c0e.png)
jlaw9 commented 7 years ago

Fixes part of issue #287

adbharadwaj commented 6 years ago

I am closing this pull request. I manually pulled in your code and made the changes I requested. You still have to submit a documentation. Please create a new pull request for documentation.