Skip to content

Commit

Permalink
Merge pull request #135 from FilippoPolo/master
Browse files Browse the repository at this point in the history
Updated README.md to point to WebMsagl
  • Loading branch information
levnach committed Aug 29, 2017
2 parents fe2edd8 + 02b25da commit e483553
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GraphLayout/MsaglSharpkit/WebMsagl/Samples/BigGraph/app.ts
Expand Up @@ -12,6 +12,7 @@ var stopButton = <HTMLButtonElement>document.getElementById("stopButton");
var working = document.getElementById("working");
var elapsed = document.getElementById("elapsed");
var edgeRoutingSelect = <HTMLSelectElement>document.getElementById("edgeRoutingSelect");
var layeredLayoutCheckBox = <HTMLInputElement>document.getElementById("layeredLayoutCheckBox");

function setGUIToRunning() {
working.style.display = "inline";
Expand All @@ -38,6 +39,7 @@ function run(nodeCount: number, edgeCount: number) {
id: "edge" + i, source: "node" + Math.floor(Math.random() * nodeCount + 1),
target: "node" + Math.floor(Math.random() * nodeCount + 1)
}));
graph.settings.layout = layeredLayoutCheckBox.checked ? G.GSettings.sugiyamaLayout : G.GSettings.mdsLayout;

var startTime = new Date();
graph.createNodeBoundariesForSVGInContainer(graphView);
Expand Down
Expand Up @@ -22,6 +22,8 @@
<option value="rectilinear">Rectilinear</option>
<option value="rectilineartocenter">Rectilinear to Center</option>
</select>
<input type="checkbox" class="graphToolbarCheckBox" id="layeredLayoutCheckBox" checked />
<span>Layered layout</span>
<button id="startButton">START</button>
<button id="stopButton" disabled>STOP</button>
<span id="working">WORKING...</span>
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -86,6 +86,15 @@ The ideas, design, and the mathematics of GraphMaps are described in [this paper
![](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/msagl-c34826a5e3af4cecbd8165fabc947b36.jpg)
![](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/msagl-44a7b11774a54cab92a3f75a9501601b.png)

# MSAGL in JavaScript

WebMSAGL is a version of MSAGL that was transcompiled to JavaScript with [SharpKit] (https://github.com/SharpKit/SharpKit/), plus a [TypeScript] (https://www.typescriptlang.org/) wrapper and rendering/interaction layer that provides a friendly TypeScript API. You can create a graph either programmatically or from a JSON object, have MSAGL create a layout for it, and then render it to an HTML Canvas or to an SVG block. All layout operations are run in a web worker, ensuring that your application remains responsive while computation is taking place. Limited interactivity is also supported.

## Using WebMSAGL
* open WebMsagl.sln and build the solution,
* set index.html from any of the sample folders as the starting page,
* run WebMsagl.


# Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

0 comments on commit e483553

Please sign in to comment.