cytoscape-anywhere-panning
NOTE You may not need this plugin because of this commit.
NOTE The API has drastically changed from v0.4.0 to v0.5.0.
Description
Allow panning from nodes/edges (demo)
Dependencies
- Cytoscape.js ^3.2.0
Usage instructions
Download the library:
- via npm:
npm install cytoscape-anywhere-panning
, - via unpkg:
https://unpkg.com/cytoscape-anywhere-panning/dist/index.js
Import the library as appropriate for your project:
ES import:
;; cytoscape;
CommonJS require:
let cytoscape = ;let anywherePanning = ; cytoscape; // register extension
AMD:
;
Plain HTML/JS has the extension registered for you automatically, because no require()
is needed.
API
cy; cy; // An event which is emitted when panning has started.// The second argument is an event for "vmousedown".cy; // An event which is emitted when the cursor has moved during panning.// The second argument is an event for "vmousemove".cy; // An event which is emitted when the panning has ended.// The second argument is an event for "vmouseup".cy;
Build targets
npm run build
: Build./src/**
intodist/index.js
npm run lint
: Run eslint on the source
Publishing instructions
This project is set up to automatically be published to npm and bower. To publish:
- Build the extension :
npm run build
- Commit the build :
git commit -am "Build for release"
- Bump the version number and tag:
npm version major|minor|patch
- Push to origin:
git push && git push --tags
- Publish to npm:
npm publish .