Skip to content

zakjan/cytoscape-lasso

Repository files navigation

cytoscape-lasso

Lasso selection plugin for Cytoscape

Demo

Screenshot

Lasso selection is implemented using public Cytoscape API, rendering lasso polygon to a new topmost separate canvas.

Lasso polygon style can be controlled by box selection style properties:

  • selection-box-color
  • selection-box-border-color
  • selection-box-border-width
  • selection-box-opacity

Box selection core events and collection events are fired:

  • boxstart
  • boxend
  • boxselect
  • box
  • select
  • unselect

Compatible with Cytoscape plugins:

Install

npm install cytoscape-lasso

or

<script src="https://unpkg.com/cytoscape-lasso@1.1.4/dist/cytoscape-lasso.min.js"></script>

Usage

The plugin exposes a single function, which should be used to register the plugin to Cytoscape.js.

import cytoscape from 'cytoscape';
import cytoscapeLasso from 'cytoscape-lasso';

cytoscape.use(cytoscapeLasso);

Plain HTML/JS has the extension registered for you automatically.

API

cy.lassoSelectionEnabled()
cy.lassoSelectionEnabled(bool)

Get or set whether lasso selection is enabled. If enabled along with panning, the user must hold down one of shift, control, or command to initiate lasso selection.

Sponsors

Graphlytic

Graphlytic is a customizable web application for collaborative graph visualization and analysis. There is a free version for Neo4j Desktop available.

About

Lasso selection plugin for Cytoscape

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published