UNPKG

cytoscape-spread

Version:

The Spread physics simulation layout for Cytoscape.js

17 lines (11 loc) 375 B
'use strict'; // registers the extension on a cytoscape lib ref var getLayout = require('./layout'); var register = function( cytoscape ){ var layout = getLayout( cytoscape ); cytoscape('layout', 'spread', layout); }; if( typeof cytoscape !== 'undefined' ){ // expose to global cytoscape (i.e. window.cytoscape) register( cytoscape ); } module.exports = register;