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

cytoscape-cose-bilkent

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape-cose-bilkent - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "cytoscape-cose-bilkent",
"version": "3.0.1",
"version": "3.0.2",
"description": "The CoSE layout for Cytoscape.js by Bilkent",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -89,3 +89,4 @@ var FDLayout = require('./FDLayout');

CoSELayout.prototype.classicLayout = function () {
this.calculateNodesToApplyGravitationTo();
this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();
this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);
this.calcNoOfChildrenForAllNodes();

@@ -111,2 +112,8 @@ this.graphManager.calcLowestCommonAncestors();

this.reduceTrees();
// Update nodes that gravity will be applied
this.graphManager.resetAllNodesToApplyGravitation();
var allNodes = new Set(this.getAllNodes());
var intersection = this.nodesWithGravity.filter(x => allNodes.has(x));
this.graphManager.setAllNodesToApplyGravitation(intersection);
this.positionNodesRandomly();

@@ -156,3 +163,9 @@ }

this.updateGrid();
this.growTree(this.prunedNodesAll, this.isFirstGrowth);
this.growTree(this.prunedNodesAll);
// Update nodes that gravity will be applied
this.graphManager.resetAllNodesToApplyGravitation();
var allNodes = new Set(this.getAllNodes());
var intersection = this.nodesWithGravity.filter(x => allNodes.has(x));
this.graphManager.setAllNodesToApplyGravitation(intersection);
this.graphManager.updateBounds();

@@ -250,3 +263,3 @@ this.updateGrid();

this.graphManager.setAllNodesToApplyGravitation(nodeList);
return nodeList;
};

@@ -253,0 +266,0 @@

@@ -183,10 +183,7 @@ var Layout = require('./Layout');

var node;
var allNodes = new Set(this.getAllNodes());
var lNodes = this.getAllNodesToApplyGravitation();
var intersection = lNodes.filter(x => allNodes.has(x));
for (var i = 0; i < intersection.length; i++)
for (var i = 0; i < lNodes.length; i++)
{
node = intersection[i];
node = lNodes[i];
this.calcGravitationalForce(node);

@@ -567,3 +564,3 @@ }

// Grow tree one step
FDLayout.prototype.growTree = function(prunedNodesAll, isFirstGrowth)
FDLayout.prototype.growTree = function(prunedNodesAll)
{

@@ -570,0 +567,0 @@ var lengthOfPrunedNodesInStep = prunedNodesAll.length;

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