Name: cytoscape.js-synched
Owner: iVis-at-Bilkent
Description: null
Created: 2018-04-10 12:44:50.0
Updated: 2018-04-19 11:04:18.0
Pushed: 2018-04-19 11:08:46.0
Homepage: null
Size: 13737
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Synchronized layout (demo)
Download the library:
npm install cytoscape-synched
,bower install cytoscape-synched
, orImport the library as appropriate for your project:
ES import:
rt cytoscape from 'cytoscape';
rt synchedLayout from 'cytoscape-synched';
scape.use( synchedLayout );
CommonJS require:
cytoscape = require('cytoscape');
synchedLayout = require('cytoscape-synched');
scape.use( synchedLayout ); // register extension
AMD:
ire(['cytoscape', 'cytoscape-synched'], function( cytoscape, synchedLayout ){
nchedLayout( cytoscape ); // register extension
Plain HTML/JS has the extension registered for you automatically, because no require()
is needed.
let api = cy.synchedLayout('get')
: get the extension instanceapi.applyMergedLayout(cy, cy2)
: apply merged layoutapi.applyUnnamedLayout(cy, cy2)
: apply unnamed layoutnpm run build
: Build ./src/**
into cytoscape-synched.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 servernpm run lint
: Run eslint on the sourceN.b. all builds use babel, so modern ES features can be used in the src
.
This project is set up to automatically be published to npm and bower. To publish:
npm run build:release
git commit -am "Build for release"
npm version major|minor|patch
git push && git push --tags
npm publish .
bower register cytoscape-synched https://github.com/iVis-at-Bilkent/cytoscape.js-synched.git