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.13.0 to 3.13.1

32

.size-snapshot.json
{
"build/cytoscape.umd.js": {
"bundled": 926866,
"minified": 343399,
"gzipped": 106827
"bundled": 927167,
"minified": 343523,
"gzipped": 106844
},
"build/cytoscape.cjs.js": {
"bundled": 854137,
"minified": 362078,
"gzipped": 109159
"bundled": 854432,
"minified": 362202,
"gzipped": 109185
},
"build/cytoscape.esm.js": {
"bundled": 853964,
"minified": 361935,
"gzipped": 109124,
"bundled": 854259,
"minified": 362059,
"gzipped": 109151,
"treeshaked": {
"rollup": {
"code": 338049,
"code": 338173,
"import_statements": 51
},
"webpack": {
"code": 339923
"code": 340047
}

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

"build/cytoscape.esm.min.js": {
"bundled": 343214,
"minified": 342724,
"gzipped": 106650,
"bundled": 343338,
"minified": 342848,
"gzipped": 106676,
"treeshaked": {
"rollup": {
"code": 342200,
"code": 342324,
"import_statements": 0
},
"webpack": {
"code": 343484
"code": 343608
}

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

{
"name": "cytoscape",
"version": "3.13.0",
"version": "3.13.1",
"license": "MIT",

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

"dist": "cross-env NODE_ENV=production run-s build dist:*",
"release": "run-s copyright dist docs",
"postpublish": "run-s docs:push",
"release": "run-s copyright dist",
"watch": "run-s watch:fast",

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

let hopcroftTarjanBiconnected = function() {
let eles = this;

@@ -10,3 +9,2 @@ let nodes = {};

let visitedEdges = {};
let loops = {};

@@ -16,4 +14,3 @@ const buildComponent = (x, y) => {

let cutset = [];
let visitedNodes = {};
let component = [];
let component = eles.spawn();

@@ -27,24 +24,22 @@ while (stack[i].x != x || stack[i].y != y) {

cutset.forEach(edge => {
component.push(edge);
let connectedNodes = edge.connectedNodes().intersection(eles);
let connectedNodes = edge.connectedNodes()
.intersection(eles);
component.merge(edge);
connectedNodes.forEach(node => {
let nodeId = node.id();
if (!(nodeId in visitedNodes)) {
visitedNodes[nodeId] = true;
if (nodeId in loops) {
loops[nodeId].forEach(loop => component.push(loop));
}
component.push(node);
const nodeId = node.id();
const connectedEdges = node.connectedEdges()
.intersection(eles);
component.merge(node);
if (!nodes[nodeId].cutVertex) {
component.merge(connectedEdges);
} else {
component.merge(connectedEdges.filter(edge => edge.isLoop()));
}
});
});
components.push(eles.spawn(component));
components.push(component);
};
const biconnectedSearch = (root, currentNode, parent) => {
if (root == parent) edgeCount += 1;
if (root === parent) edgeCount += 1;
nodes[currentNode] = {

@@ -55,3 +50,5 @@ id : id,

};
let edges = eles.getElementById(currentNode).connectedEdges().intersection(eles);
let edges = eles.getElementById(currentNode)
.connectedEdges()
.intersection(eles);

@@ -61,3 +58,3 @@ if (edges.size() === 0) {

} else {
let sourceId, targetId, otherNodeId, edgeId, isEdgeLoop;
let sourceId, targetId, otherNodeId, edgeId;

@@ -67,12 +64,5 @@ edges.forEach(edge => {

targetId = edge.target().id();
otherNodeId = (sourceId == currentNode) ? targetId : sourceId;
isEdgeLoop = edge.isLoop();
otherNodeId = (sourceId === currentNode) ? targetId : sourceId;
if (isEdgeLoop) {
if (sourceId in loops) {
loops.push(edge);
} else {
loops[sourceId] = [edge];
}
} else if (otherNodeId != parent) {
if (otherNodeId !== parent) {
edgeId = edge.id();

@@ -85,3 +75,3 @@

y : otherNodeId,
edge : eles.getElementById(edgeId)
edge
});

@@ -92,3 +82,4 @@ }

biconnectedSearch(root, otherNodeId, currentNode);
nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low);
nodes[currentNode].low = Math.min(nodes[currentNode].low,
nodes[otherNodeId].low);

@@ -100,3 +91,4 @@ if (nodes[currentNode].id <= nodes[otherNodeId].low) {

} else {
nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id);
nodes[currentNode].low = Math.min(nodes[currentNode].low,
nodes[otherNodeId].id);
}

@@ -109,3 +101,2 @@ }

eles.forEach(ele => {
if (ele.isNode()) {

@@ -116,3 +107,3 @@ let nodeId = ele.id();

edgeCount = 0;
biconnectedSearch(nodeId, nodeId, "");
biconnectedSearch(nodeId, nodeId);
nodes[nodeId].cutVertex = (edgeCount > 1);

@@ -129,12 +120,11 @@ }

cut: eles.spawn(cutVertices),
components: components
components
};
};
export default {
hopcroftTarjanBiconnected,
htbc: hopcroftTarjanBiconnected,
export default {
hopcroftTarjanBiconnected,
htbc: hopcroftTarjanBiconnected,
htb: hopcroftTarjanBiconnected,
hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected
};

@@ -8,2 +8,6 @@ import * as is from '../../is';

if( start === end ){
return end;
}
let val = easingFn( start, end, percent );

@@ -10,0 +14,0 @@

@@ -159,2 +159,4 @@ import * as util from '../util';

if( vp.panned ){ properties.pan = vp.pan; }
} else {
properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed
}

@@ -161,0 +163,0 @@ }

@@ -78,5 +78,7 @@ var BRp = {};

BRp.recalculateRenderedStyle = function( eles, useCache ){
var edges = [];
var nodes = [];
let isCleanConnected = ele => ele._private.rstyle.cleanConnected;
let edges = [];
let nodes = [];
// the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox()

@@ -93,2 +95,8 @@ if( this.destroyed ){ return; }

// an edge may be implicitly dirty b/c of one of its connected nodes
// (and a request for recalc may come in between frames)
if( ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target())) ){
rstyle.clean = false;
}
// only update if dirty and in graph

@@ -95,0 +103,0 @@ if( (useCache && rstyle.clean) || ele.removed() ){ continue; }

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

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