A Cytoscape.js plugin for rendering Bubblesets.
npm install cytoscape cytoscape-layers cytoscape-bubblesetssee Samples on Github
import cytoscape from 'cytoscape';
import BubbleSets from 'cytoscape-bubblesets';
cytoscape.use(BubbleSets);
const cy = cytoscape({
container: document.getElementById('app'),
elements: [
{ data: { id: 'a' } },
{ data: { id: 'b' } },
{
data: {
id: 'ab',
source: 'a',
target: 'b',
},
},
],
});
cy.ready(() => {
const bb = cy.bubbleSets();
bb.addPath(cy.nodes(), cy.edges(), null);
});Alternative without registration
import cytoscape from 'cytoscape';
import { BubbleSetsPlugin } from 'cytoscape-bubblesets';
const cy = cytoscape({
container: document.getElementById('app'),
elements: [
{ data: { id: 'a' } },
{ data: { id: 'b' } },
{
data: {
id: 'ab',
source: 'a',
target: 'b',
},
},
],
});
cy.ready(() => {
const bb = new BubbleSetsPlugin(cy);
bb.addPath(cy.nodes(), cy.edges(), null);
});-
addPath(nodes: NodeCollection, edges?: EdgeCollection | null, avoidNodes?: NodeCollection | null, options?: IBubbleSetPathOptions): BubbleSetPathcreates a new
BubbleSetPathinstance. Thenodesis a node collection that should be linked.edgesan edge collection to include edges.avoidNodesis an optional node collection of nodes that should be avoided when generating the outline and any virtual edge between the nodes. -
removePath(path: BubbleSetPath)removes a path again
-
getPaths(): readonly BubbleSetPath[]returns the list of active paths
npm i -g yarn
yarn set version latest
cat .yarnrc_patch.yml >> .yarnrc.yml
yarn
yarn pnpify --sdk vscodeyarn compile
yarn test
yarn lint
yarn fix
yarn build
yarn docs
yarn release
yarn release:pre
