Permalink
Browse files

Update documentation for noverlap

  • Loading branch information...
1 parent 60008b9 commit 94e0b8d7ef9f1bd9eb16977ff31a4e7b85e7499d @apitts apitts committed Feb 28, 2016
Showing with 13 additions and 6 deletions.
  1. +13 −6 plugins/sigma.layout.noverlap/README.md
@@ -14,23 +14,23 @@ This plugin runs an algorithm which distributes nodes in the network, ensuring t
Changes the layout's configuration.
```js
-var listener = sigma.layout.noverlap.configure(sigInst, config);
+var listener = s.configNoverlap(config);
```
**start**
Starts the layout. It is possible to pass a configuration if this is the first time you start the layout.
```js
-var listener = sigma.layout.noverlap.start(sigInst, config);
+s.startNoverlap();
```
**isRunning**
Returns whether the layout is running.
```js
-sigma.layout.noverlap.isRunning(sigInst);
+s.isNoverlapRunning();
```
## Configuration
@@ -63,18 +63,25 @@ The plugin dispatches the following events:
Example:
```js
+
+s = new sigma({
+ graph: g,
+ container: 'graph-container'
+});
+
var config = {
nodeMargin: 3.0,
scaleNodes: 1.3
};
-// Start the algorithm:
-var listener = sigma.layout.noverlap.configure(sigInst, config);
+// Configure the algorithm
+var listener = s.configNoverlap(config);
// Bind all events:
listener.bind('start stop interpolate', function(event) {
console.log(event.type);
});
-sigma.layout.noverlap.start(sigInst);
+// Start the algorithm:
+s.startNoverlap();
```

0 comments on commit 94e0b8d

Please sign in to comment.