-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f97e70a
commit 307a163
Showing
23 changed files
with
87,958 additions
and
1,209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
bundle.js | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2018, iVis-at-Bilkent. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the “Software”), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
cytoscape-layvo | ||
================================================================================ | ||
|
||
|
||
## Description | ||
|
||
Layout quality evaluation tool ([demo](https://iVis-at-Bilkent.github.io/cytoscape-layvo)) | ||
|
||
## Dependencies | ||
|
||
* Cytoscape.js ^3.2.0 | ||
|
||
|
||
## Usage instructions | ||
|
||
Download the library: | ||
* via npm: `npm install cytoscape-layvo`, | ||
* via bower: `bower install cytoscape-layvo`, or | ||
* via direct download in the repository (probably from a tag). | ||
|
||
Import the library as appropriate for your project: | ||
|
||
ES import: | ||
|
||
```js | ||
import cytoscape from 'cytoscape'; | ||
import layvo from 'cytoscape-layvo'; | ||
|
||
cytoscape.use( layvo ); | ||
``` | ||
|
||
CommonJS require: | ||
|
||
```js | ||
let cytoscape = require('cytoscape'); | ||
let layvo = require('cytoscape-layvo'); | ||
|
||
cytoscape.use( layvo ); // register extension | ||
``` | ||
|
||
AMD: | ||
|
||
```js | ||
require(['cytoscape', 'cytoscape-layvo'], function( cytoscape, layvo ){ | ||
layvo( cytoscape ); // register extension | ||
}); | ||
``` | ||
|
||
Plain HTML/JS has the extension registered for you automatically, because no `require()` is needed. | ||
|
||
|
||
## API | ||
- `let api = cy.layvo('get')`: get the extension instance | ||
- `api.generalProperties()`: get general layout metrics | ||
- `api.generalProperties(nodes, edges)`: get general layout metrics for the given array of nodes and edges | ||
- `api.differenceMetrics(cy, cy2)`: get synchronized layout similarity metrics | ||
|
||
## Build targets | ||
|
||
* `npm run test` : Run Mocha tests in `./test` | ||
* `npm run build` : Build `./src/**` into `cytoscape-layvo.js` | ||
* `npm run watch` : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running) | ||
* `npm run dev` : Automatically build on changes with live reloading with webpack dev server | ||
* `npm run lint` : Run eslint on the source | ||
|
||
N.b. all builds use babel, so modern ES features can be used in the `src`. | ||
|
||
|
||
## Publishing instructions | ||
|
||
This project is set up to automatically be published to npm and bower. To publish: | ||
|
||
1. Build the extension : `npm run build:release` | ||
1. Commit the build : `git commit -am "Build for release"` | ||
1. Bump the version number and tag: `npm version major|minor|patch` | ||
1. Push to origin: `git push && git push --tags` | ||
1. Publish to npm: `npm publish .` | ||
1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-layvo https://github.com/iVis-at-Bilkent/cytoscape-layvo.git` | ||
1. [Make a new release](https://github.com/iVis-at-Bilkent/cytoscape-layvo/releases/new) for Zenodo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "cytoscape-layvo", | ||
"description": "Layout quality evaluation tool", | ||
"main": "cytoscape-layvo.js", | ||
"dependencies": { | ||
"cytoscape": "^3.2.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/iVis-at-Bilkent/cytoscape-layvo.git" | ||
}, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"keywords": [ | ||
"cytoscape", | ||
"cytoscape-extension" | ||
], | ||
"license": "MIT" | ||
} |
Oops, something went wrong.