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

cytoscape

Package Overview
Dependencies
Maintainers
3
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.12.1 to 3.12.2

32

.size-snapshot.json
{
"build/cytoscape.umd.js": {
"bundled": 920157,
"minified": 341511,
"gzipped": 106114
"bundled": 921218,
"minified": 341676,
"gzipped": 106237
},
"build/cytoscape.cjs.js": {
"bundled": 847790,
"minified": 359894,
"gzipped": 108385
"bundled": 848807,
"minified": 360099,
"gzipped": 108513
},
"build/cytoscape.esm.js": {
"bundled": 847617,
"minified": 359751,
"gzipped": 108351,
"bundled": 848634,
"minified": 359956,
"gzipped": 108479,
"treeshaked": {
"rollup": {
"code": 336163,
"code": 336328,
"import_statements": 51
},
"webpack": {
"code": 338031
"code": 338196
}

@@ -27,12 +27,12 @@ }

"build/cytoscape.esm.min.js": {
"bundled": 341152,
"minified": 340638,
"gzipped": 105845,
"bundled": 341491,
"minified": 341001,
"gzipped": 106081,
"treeshaked": {
"rollup": {
"code": 340114,
"code": 340477,
"import_statements": 0
},
"webpack": {
"code": 341400
"code": 341763
}

@@ -39,0 +39,0 @@ }

{
"name": "cytoscape",
"version": "3.12.1",
"version": "3.12.2",
"license": "MIT",

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

"release": "run-s copyright dist docs",
"postpublish": "run-s docs:push",
"watch": "run-s watch:fast",

@@ -113,0 +112,0 @@ "watch:sync": "livereload \"build, debug\"",

@@ -137,8 +137,10 @@ import * as math from '../../../../math';

let ly = trs.labelY;
let lw2 = lw/2;
let lh2 = lh/2;
let va = target.pstyle('text-valign').value;
if( va === 'top' ){
ly -= lh/2;
ly -= lh2;
} else if( va === 'bottom' ){
ly += lh/2;
ly += lh2;
}

@@ -148,23 +150,32 @@

if( ha === 'left' ){
lx -= lw/2;
lx -= lw2;
} else if( ha === 'right' ){
lx += lw/2;
lx += lw2;
}
let labelIntersect = r.nodeShapes['rectangle'].intersectLine(
lx,
ly,
lw,
lh,
p1_i[0],
p1_i[1],
0
);
let labelIntersect = math.polygonIntersectLine(p1_i[0], p1_i[1], [
lx - lw2, ly - lh2,
lx + lw2, ly - lh2,
lx + lw2, ly + lh2,
lx - lw2, ly + lh2
], tgtPos.x, tgtPos.y);
let refPt = srcPos;
let intSqdist = math.sqdist( refPt, math.array2point(intersect) );
let labIntSqdist = math.sqdist( refPt, math.array2point(labelIntersect) );
if( labelIntersect.length > 0 ){
let refPt = srcPos;
let intSqdist = math.sqdist( refPt, math.array2point(intersect) );
let labIntSqdist = math.sqdist( refPt, math.array2point(labelIntersect) );
let minSqDist = intSqdist;
if( labIntSqdist < intSqdist ){
intersect = labelIntersect;
if( labIntSqdist < intSqdist ){
intersect = labelIntersect;
minSqDist = labIntSqdist;
}
if( labelIntersect.length > 2 ){
let labInt2SqDist = math.sqdist( refPt, { x: labelIntersect[2], y: labelIntersect[3] } );
if( labInt2SqDist < minSqDist ){
intersect = [ labelIntersect[2], labelIntersect[3] ];
}
}
}

@@ -220,8 +231,10 @@ }

let ly = srs.labelY;
let lw2 = lw/2;
let lh2 = lh/2;
let va = source.pstyle('text-valign').value;
if( va === 'top' ){
ly -= lh/2;
ly -= lh2;
} else if( va === 'bottom' ){
ly += lh/2;
ly += lh2;
}

@@ -231,23 +244,32 @@

if( ha === 'left' ){
lx -= lw/2;
lx -= lw2;
} else if( ha === 'right' ){
lx += lw/2;
lx += lw2;
}
let labelIntersect = r.nodeShapes['rectangle'].intersectLine(
lx,
ly,
lw,
lh,
p2_i[0],
p2_i[1],
0
);
let labelIntersect = math.polygonIntersectLine(p2_i[0], p2_i[1], [
lx - lw2, ly - lh2,
lx + lw2, ly - lh2,
lx + lw2, ly + lh2,
lx - lw2, ly + lh2
], srcPos.x, srcPos.y);
let refPt = tgtPos;
let intSqdist = math.sqdist( refPt, math.array2point(intersect) );
let labIntSqdist = math.sqdist( refPt, math.array2point(labelIntersect) );
if( labelIntersect.length > 0 ){
let refPt = tgtPos;
let intSqdist = math.sqdist( refPt, math.array2point(intersect) );
let labIntSqdist = math.sqdist( refPt, math.array2point(labelIntersect) );
let minSqDist = intSqdist;
if( labIntSqdist < intSqdist ){
intersect = labelIntersect;
if( labIntSqdist < intSqdist ){
intersect = [ labelIntersect[0], labelIntersect[1] ];
minSqDist = labIntSqdist;
}
if( labelIntersect.length > 2 ){
let labInt2SqDist = math.sqdist( refPt, { x: labelIntersect[2], y: labelIntersect[3] } );
if( labInt2SqDist < minSqDist ){
intersect = [ labelIntersect[2], labelIntersect[3] ];
}
}
}

@@ -254,0 +276,0 @@ }

@@ -502,7 +502,5 @@ import * as math from '../../../../math';

if( ele.pstyle( 'text-wrap' ).value === 'wrap' ){
ds.whiteSpace = 'pre'; // so newlines are taken into account
} else {
ds.whiteSpace = 'normal';
}
// - newlines must be taken into account for text-wrap:wrap
// - since spaces are not collapsed, each space must be taken into account
ds.whiteSpace = 'pre';

@@ -509,0 +507,0 @@ // put label content in div

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

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

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

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

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

Sorry, the diff of this file is not supported yet

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