New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cytoscape-auto-pan-on-out-of-canvas-bounds

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape-auto-pan-on-out-of-canvas-bounds

An extension to automatically pan when nodes are out of canvas bounds.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

cytoscape-auto-pan-on-out-of-canvas-bounds

!!!Important Warning

This extension is renamed as cytoscape-autopan-on-drag. It will be maintained with that name. Please use it.

New npm repository address is 'https://www.npmjs.com/package/cytoscape-autopan-on-drag'

New GitHub repository address is 'https://github.com/iVis-at-Bilkent/cytoscape.js-autopan-on-drag'

Description

An extension to automatically pan when nodes are out of canvas bounds.

Dependencies

  • Cytoscape.js ^2.7.0

Usage instructions

Download the library:

  • via npm: npm install cytoscape-auto-pan-on-out-of-canvas-bounds,
  • via bower: bower install cytoscape-auto-pan-on-out-of-canvas-bounds, or
  • via direct download in the repository (probably from a tag).

require() the library as appropriate for your project:

CommonJS:

var cytoscape = require('cytoscape');
var auto-pan-on-out-of-canvas-bounds = require('cytoscape-auto-pan-on-out-of-canvas-bounds');

auto-pan-on-out-of-canvas-bounds( cytoscape ); // register extension

AMD:

require(['cytoscape', 'cytoscape-auto-pan-on-out-of-canvas-bounds'], function( cytoscape, auto-pan-on-out-of-canvas-bounds ){
  auto-pan-on-out-of-canvas-bounds( cytoscape ); // register extension
});

Plain HTML/JS has the extension registered for you automatically, because no require() is needed.

Default Options

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
};

API

var instance = cy.autoPanOnOutOfCanvasBounds( 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.autoPanOnOutOfCanvasBounds('get');

Publishing instructions

This project is set up to automatically be published to npm and bower. To publish:

  1. Set the version number environment variable: export VERSION=1.2.3
  2. Publish: gulp publish
  3. If publishing to bower for the first time, you'll need to run bower register cytoscape-auto-pan-on-out-of-canvas-bounds https://github.com/iVis-at-Bilkent/cytoscape.js-auto-pan-on-out-of-canvas-bounds.git

Team

Keywords

FAQs

Package last updated on 16 Aug 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc