
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
cytoscape-autopan-on-drag
Advanced tools
An extension to automatically pan when nodes are out of canvas bounds.
A Cytsocape.js extension to automatically pan when nodes are out of canvas bounds distributed under The MIT License.
Please cite the following paper when using this extension:
U. Dogrusoz , A. Karacelik, I. Safarli, H. Balci, L. Dervishi, and M.C. Siper, "Efficient methods and readily customizable libraries for managing complexity of large networks", PLoS ONE, 13(5): e0197238, 2018.
Download the library:
npm install cytoscape-autopan-on-drag
,bower install cytoscape-autopan-on-drag
, orrequire()
the library as appropriate for your project:
CommonJS:
var cytoscape = require('cytoscape');
var autopanOnDrag = require('cytoscape-autopan-on-drag');
autopanOnDrag( cytoscape ); // register extension
AMD:
require(['cytoscape', 'cytoscape-autopan-on-drag'], function( cytoscape, autopanOnDrag ){
autopanOnDrag( cytoscape ); // register extension
});
Plain HTML/JS has the extension registered for you automatically, because no require()
is needed.
var options = {
enabled: true, // Whether the extension is enabled on register
selector: 'node', // Which elements will be affected by this extension
speed: 1 // Speed of panning when elements exceed canvas bounds
};
var instance = cy.autopanOnDrag( options );
An instance has a number of functions available:
instance.enable(); // enable the instance
instance.disable(); // disable the instance
You can also get an existing instance:
cy.autopanOnDrag('get');
This project is set up to automatically be published to npm and bower. To publish:
export VERSION=1.2.3
gulp publish
bower register cytoscape-autopan-on-drag https://github.com/iVis-at-Bilkent/cytoscape.js-autopan-on-drag.git
FAQs
An extension to automatically pan when nodes are out of canvas bounds.
We found that cytoscape-autopan-on-drag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.