Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cytoscape-edgehandles

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape-edgehandles - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

42

cytoscape-edgehandles.js

@@ -262,3 +262,21 @@ /*!

// ported lodash throttle function
var throttle = function( func, wait, options ){
var leading = true,
trailing = true;
if( options === false ){
leading = false;
} else if( typeof options === typeof {} ){
leading = 'leading' in options ? options.leading : leading;
trailing = 'trailing' in options ? options.trailing : trailing;
}
options = options || {};
options.leading = leading;
options.maxWait = wait;
options.trailing = trailing;
return debounce( func, wait, options );
};
// registers the extension on a cytoscape lib ref

@@ -314,3 +332,4 @@ var register = function( $$, $ ) {

var edgehandles = function( params, cy ) {
var edgehandles = function( params ) {
var cy = this;
var fn = params;

@@ -569,13 +588,6 @@ var container = cy.container();

var lineDrawRate = 1000 / 30;
var lastDrawLine = 0;
var drawLine = function( hx, hy, x, y ) {
var now = +new Date();
var lineDrawRate = 1000 / 60;
if( now - lastDrawLine < lineDrawRate ) {
return;
}
var drawLine = throttle( function( hx, hy, x, y ) {
lastDrawLine = now;
if( options().handleLineType !== 'ghost' ) {

@@ -664,3 +676,3 @@ ctx.fillStyle = options().handleColor;

}
};
}, lineDrawRate, { leading: true } );

@@ -1302,8 +1314,4 @@ function makeEdges( preview, src, tgt ) {

$$( 'core', 'edgehandles', function( options ) {
var cy = this;
$$( 'core', 'edgehandles', edgehandles );
return edgehandles( options, cy );
} );
};

@@ -1325,2 +1333,2 @@

} )( cytoscape, jQuery );
} )( typeof cytoscape !== 'undefined' ? cytoscape : null, typeof jQuery !== 'undefined' ? jQuery : null );
{
"name": "cytoscape-edgehandles",
"version": "2.3.1",
"version": "2.3.2",
"description": "Edge creation extension for Cytoscape.js",

@@ -5,0 +5,0 @@ "main": "cytoscape-edgehandles.js",

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