Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.