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

cytoscape

Package Overview
Dependencies
Maintainers
5
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape - npm Package Compare versions

Comparing version 3.30.2 to 3.30.3

2

package.json
{
"name": "cytoscape",
"version": "3.30.2",
"version": "3.30.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation",

@@ -344,7 +344,12 @@ import * as is from '../../is';

// shift by margin and expand by outline and border
lx1 += marginX - Math.max( outlineWidth, halfBorderWidth ) - padding - marginOfError;
lx2 += marginX + Math.max( outlineWidth, halfBorderWidth ) + padding + marginOfError;
ly1 += marginY - Math.max( outlineWidth, halfBorderWidth ) - padding - marginOfError;
ly2 += marginY + Math.max( outlineWidth, halfBorderWidth ) + padding + marginOfError;
let leftPad = marginX - Math.max( outlineWidth, halfBorderWidth ) - padding - marginOfError;
let rightPad = marginX + Math.max( outlineWidth, halfBorderWidth ) + padding + marginOfError;
let topPad = marginY - Math.max( outlineWidth, halfBorderWidth ) - padding - marginOfError;
let botPad = marginY + Math.max( outlineWidth, halfBorderWidth ) + padding + marginOfError;
lx1 += leftPad;
lx2 += rightPad;
ly1 += topPad;
ly2 += botPad;
// always store the unrotated label bounds separately

@@ -360,2 +365,6 @@ let bbPrefix = prefix || 'main';

bb.h = ly2 - ly1;
bb.leftPad = leftPad;
bb.rightPad = rightPad;
bb.topPad = topPad;
bb.botPad = botPad;

@@ -818,3 +827,3 @@ let isAutorotate = ( isEdge && rotation.strValue === 'autorotate' );

let isDirty = ele => ele._private.bbCache == null || ele._private.styleDirty;
let needRecalc = !useCache || isDirty(ele) || (isEdge && isDirty(ele.source()) || isDirty(ele.target()));
let needRecalc = !useCache || isDirty(ele) || (isEdge && (isDirty(ele.source()) || isDirty(ele.target())));

@@ -821,0 +830,0 @@ if( needRecalc ){

@@ -921,3 +921,5 @@ import * as math from '../../../../math';

srcPos: tgtPos,
srcRs: tgtRs,
tgtPos: srcPos,
tgtRs: srcRs,
srcW: tgtW,

@@ -1018,7 +1020,7 @@ srcH: tgtH,

let rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle( edge );
let type = rs.edgeType;
if( type === 'segments' ){
this.recalculateRenderedStyle( edge );
return getPts( rs.segpts );

@@ -1030,7 +1032,7 @@ }

let rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle( edge );
let type = rs.edgeType;
if( type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound' ){
this.recalculateRenderedStyle( edge );
return getPts( rs.ctrlpts );

@@ -1037,0 +1039,0 @@ }

@@ -11,4 +11,16 @@ import * as is from '../../../is';

var args = Array.prototype.slice.apply( arguments, [1] ); // copy
if( Array.isArray(target) ){
let res = [];
for( var i = 0; i < target.length; i++ ){
let t = target[i];
if( t !== undefined ){
var b = this.binder( t );
res.push( b.on.apply( b, args ) );
}
}
return res;
}
var b = this.binder( target );
return b.on.apply( b, args );

@@ -94,2 +106,10 @@ };

var getShadowRoot = function( element ){
const rootNode = element.getRootNode();
// Check if the root node is a shadow root
if ( rootNode && rootNode.nodeType === 11 && rootNode.host !== undefined ) {
return rootNode;
}
};
var triggerEvents = function( target, names, e, position ){

@@ -565,3 +585,4 @@ if( target == null ){

r.registerBinding( containerWindow, 'mousemove', function mousemoveHandler( e ){ // eslint-disable-line no-undef
var shadowRoot = getShadowRoot( r.container );
r.registerBinding( [ containerWindow, shadowRoot ], 'mousemove', function mousemoveHandler( e ){ // eslint-disable-line no-undef
var capture = r.hoverData.capture;

@@ -568,0 +589,0 @@

@@ -137,3 +137,3 @@ /*

let getElementBox = ele => { ele.boundingBox(); return ele[0]._private.bodyBounds; };
let getLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.main || emptyBb; };
let getLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.main || emptyBb; };
let getSourceLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.source || emptyBb; };

@@ -176,6 +176,6 @@ let getTargetLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.target || emptyBb; };

case 'left':
p.x = -bb.w;
p.x = -bb.w - (bb.leftPad || 0);
break;
case 'right':
p.x = 0;
p.x = -(bb.rightPad || 0);
break;

@@ -186,6 +186,6 @@ }

case 'top':
p.y = -bb.h;
p.y = -bb.h - (bb.topPad || 0);
break;
case 'bottom':
p.y = 0;
p.y = -(bb.botPad || 0);
break;

@@ -192,0 +192,0 @@ }

@@ -21,2 +21,3 @@ import * as util from '../../../util';

var maxLayerArea = 4000 * 4000; // layers can't be bigger than this
var maxLayerDim = 32767; // maximum size for the width/height of layer canvases
var alwaysQueue = true; // never draw all the layers in a level on a frame; draw directly until all dequeued

@@ -199,4 +200,11 @@ var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm)

var area = ( bb.w * scale ) * ( bb.h * scale );
var w = Math.ceil( bb.w * scale );
var h = Math.ceil( bb.h * scale );
if( w > maxLayerDim || h > maxLayerDim ){
return null;
}
var area = w * h;
if( area > maxLayerArea ){

@@ -203,0 +211,0 @@ return null;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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