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.
Allow panning from nodes/edges (demo)
- Cytoscape.js ^3.2.0
Download the library:
- via npm:
npm install cytoscape-anywhere-panning,
- via unpkg:
Import the library as appropriate for your project:
let cytoscape = ;let anywherePanning = ;cytoscape; // register extension
Plain HTML/JS has the extension registered for you automatically, because no
require() is needed.
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;
npm run build: Build
npm run lint: Run eslint on the source
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 .