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.17.1 to 3.17.2

32

.size-snapshot.json
{
"build/cytoscape.umd.js": {
"bundled": 934746,
"minified": 347449,
"gzipped": 108200
"bundled": 933602,
"minified": 347096,
"gzipped": 108063
},
"build/cytoscape.cjs.js": {
"bundled": 861687,
"minified": 366783,
"gzipped": 110582
"bundled": 860611,
"minified": 366380,
"gzipped": 110403
},
"build/cytoscape.esm.js": {
"bundled": 861514,
"minified": 366640,
"gzipped": 110540,
"bundled": 860438,
"minified": 366237,
"gzipped": 110360,
"treeshaked": {
"rollup": {
"code": 342097,
"code": 341744,
"import_statements": 51
},
"webpack": {
"code": 343485
"code": 343132
}

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

"build/cytoscape.esm.min.js": {
"bundled": 347254,
"minified": 346756,
"gzipped": 108025,
"bundled": 346901,
"minified": 346403,
"gzipped": 107889,
"treeshaked": {
"rollup": {
"code": 346250,
"code": 345897,
"import_statements": 0
},
"webpack": {
"code": 347538
"code": 347185
}

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

{
"name": "cytoscape",
"version": "3.17.1",
"version": "3.17.2",
"license": "MIT",

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

import * as is from '../../is';
import { assignBoundingBox, expandBoundingBoxSides, assignShiftToBoundingBox, clearBoundingBox, expandBoundingBox, makeBoundingBox, copyBoundingBox } from '../../math';
import { assignBoundingBox, expandBoundingBoxSides, clearBoundingBox, expandBoundingBox, makeBoundingBox, copyBoundingBox } from '../../math';
import { defaults, getPrefixedProperty, hashIntsArray } from '../../util';

@@ -30,3 +30,3 @@

elesfn.dirtyCompoundBoundsCache = function(){
elesfn.dirtyCompoundBoundsCache = function(silent = false){
let cy = this.cy();

@@ -43,3 +43,5 @@

ele.emitAndNotify('bounds');
if(!silent){
ele.emitAndNotify('bounds');
}
}

@@ -182,3 +184,3 @@ } );

if( !_p.compoundBoundsClean ){
if( !_p.compoundBoundsClean || force ){
update( ele );

@@ -762,3 +764,2 @@

_p.bbCache = bb;
_p.bbCacheShift.x = _p.bbCacheShift.y = 0;
_p.bbCachePosKey = currPosKey;

@@ -769,32 +770,2 @@ } else {

if( !needRecalc && (_p.bbCacheShift.x !== 0 || _p.bbCacheShift.y !== 0) ){
let shift = assignShiftToBoundingBox;
let delta = _p.bbCacheShift;
let safeShift = (bb, delta) => { if( bb != null ){ shift(bb, delta); } };
shift( bb, delta );
let { bodyBounds, overlayBounds, labelBounds, arrowBounds } = _p;
safeShift( bodyBounds, delta );
safeShift( overlayBounds, delta );
if( arrowBounds != null ){
safeShift( arrowBounds.source, delta );
safeShift( arrowBounds.target, delta );
safeShift( arrowBounds['mid-source'], delta );
safeShift( arrowBounds['mid-target'], delta );
}
if( labelBounds != null ){
safeShift( labelBounds.main, delta );
safeShift( labelBounds.all, delta );
safeShift( labelBounds.source, delta );
safeShift( labelBounds.target, delta );
}
}
// always reset the shift, because we either applied the shift or cleared it by doing a fresh recalc
_p.bbCacheShift.x = _p.bbCacheShift.y = 0;
// not using def opts => need to build up bb from combination of sub bbs

@@ -891,3 +862,3 @@ if( !usingDefOpts ){

this.updateCompoundBounds();
this.updateCompoundBounds(!options.useCache);

@@ -916,3 +887,2 @@ for( let i = 0; i < eles.length; i++ ){

_p.bbCache = null;
_p.bbCacheShift.x = _p.bbCacheShift.y = 0;
_p.bbCachePosKey = null;

@@ -939,19 +909,2 @@ _p.bodyBounds = null;

elesfn.shiftCachedBoundingBox = function( delta ){
for( let i = 0; i < this.length; i++ ){
let ele = this[i];
let _p = ele._private;
let bb = _p.bbCache;
if( bb != null ){
_p.bbCacheShift.x += delta.x;
_p.bbCacheShift.y += delta.y;
}
}
this.emitAndNotify('bounds');
return this;
};
// private helper to get bounding box for custom node positions

@@ -965,5 +918,7 @@ // - good for perf in certain cases but currently requires dirtying the rendered style

let hasCompoundNodes = cy.hasCompoundNodes();
let parents = cy.collection();
if( hasCompoundNodes ){
nodes = nodes.filter(node => !node.isParent());
parents = nodes.filter(node => node.isParent());
nodes = nodes.not(parents);
}

@@ -989,3 +944,5 @@

if( hasCompoundNodes ){
this.updateCompoundBounds(true); // force update b/c we're inside a batch cycle
parents.dirtyCompoundBoundsCache();
parents.dirtyBoundingBoxCache();
parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle
}

@@ -997,2 +954,8 @@

if( hasCompoundNodes ){
parents.dirtyCompoundBoundsCache();
parents.dirtyBoundingBoxCache();
parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle
}
cy.endBatch();

@@ -999,0 +962,0 @@

@@ -24,3 +24,3 @@ import define from '../../define';

ele.shiftCachedBoundingBox( delta );
ele.dirtyBoundingBoxCache();
}

@@ -66,2 +66,5 @@ }

beforePositionSet( eles, newPos, true );
},
onSet: function( eles ){
eles.dirtyCompoundBoundsCache();
}

@@ -68,0 +71,0 @@ } ) ),

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

layoutPositions: function( layout, options, fn ){
let nodes = this.nodes();
let nodes = this.nodes().filter(n => !n.isParent());
let cy = this.cy();

@@ -45,0 +45,0 @@ let layoutEles = options.eles; // nodes & edges

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

nodes.layoutPositions( this, options, getPosition );
eles.nodes().layoutPositions( this, options, getPosition );

@@ -355,0 +355,0 @@ return this; // chaining

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

nodes.layoutPositions( this, options, getPos );
eles.nodes().layoutPositions( this, options, getPos );

@@ -103,0 +103,0 @@ return this; // chaining

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

// position the nodes
nodes.layoutPositions( this, options, function( ele ){
eles.nodes().layoutPositions( this, options, function( ele ){
let id = ele.id();

@@ -193,0 +193,0 @@

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

if( bb.h === 0 || bb.w === 0 ){
nodes.layoutPositions( this, options, function( ele ){
eles.nodes().layoutPositions( this, options, function( ele ){
return { x: bb.x1, y: bb.y1 };

@@ -50,0 +50,0 @@ } );

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

let eles = options.eles;
let nodes = eles.nodes().not( ':parent' );
let bb = math.makeBoundingBox( options.boundingBox ? options.boundingBox : {

@@ -39,3 +39,3 @@ x1: 0, y1: 0, w: cy.width(), h: cy.height()

nodes.layoutPositions( this, options, getPos );
eles.nodes().layoutPositions( this, options, getPos );

@@ -42,0 +42,0 @@ return this; // chaining

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