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.14.2 to 3.14.3

30

.size-snapshot.json
{
"build/cytoscape.umd.js": {
"bundled": 929677,
"minified": 345303,
"gzipped": 107548
"bundled": 929686,
"minified": 345311,
"gzipped": 107546
},
"build/cytoscape.cjs.js": {
"bundled": 856806,
"minified": 364183,
"gzipped": 109877
"bundled": 856803,
"minified": 364211,
"gzipped": 109887
},
"build/cytoscape.esm.js": {
"bundled": 856633,
"minified": 364040,
"gzipped": 109841,
"bundled": 856630,
"minified": 364068,
"gzipped": 109851,
"treeshaked": {
"rollup": {
"code": 339962,
"code": 339970,
"import_statements": 51
},
"webpack": {
"code": 340872
"code": 340880
}

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

"build/cytoscape.esm.min.js": {
"bundled": 344163,
"minified": 344188,
"bundled": 344171,
"minified": 344190,
"gzipped": 107087,
"treeshaked": {
"rollup": {
"code": 343646,
"code": 343648,
"import_statements": 0
},
"webpack": {
"code": 344433
"code": 344435
}

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

{
"name": "cytoscape",
"version": "3.14.2",
"version": "3.14.3",
"license": "MIT",

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

@@ -14,12 +14,2 @@ import step from './step';

// cancel all animations on display:none ele
if( !isCore && ele.pstyle('display').value === 'none' ){
// put all current and queue animations in this tick's current list
// and empty the lists for the element
current = current.splice( 0, current.length ).concat( queue.splice( 0, queue.length ) );
// stop all animations
for( let i = 0; i < current.length; i++ ){ current[i].stop(); }
}
// if nothing currently animating, get something from the queue

@@ -26,0 +16,0 @@ if( current.length === 0 ){

@@ -269,3 +269,4 @@ import * as math from '../../../../math';

const turnIsPercent = taxiTurn.units === '%';
const taxiTurnPfVal = turnIsPercent && taxiTurn.pfValue < 0 ? 1 + taxiTurn.pfValue : taxiTurn.pfValue;
const taxiTurnPfVal = taxiTurn.pfValue;
const turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side
let minD = edge.pstyle('taxi-turn-min-distance').pfValue;

@@ -291,8 +292,8 @@ const dw = (dIncludesNodeBody ? (srcW + tgtW)/2 : 0);

if( taxiDir === AUTO ){
if( rawTaxiDir === AUTO ){
taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL;
} else if( taxiDir === UPWARD || taxiDir === DOWNWARD ){
} else if( rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD ){
taxiDir = VERTICAL;
isExplicitDir = true;
} else if( taxiDir === LEFTWARD || taxiDir === RIGHTWARD ){
} else if( rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD ){
taxiDir = HORIZONTAL;

@@ -309,3 +310,3 @@ isExplicitDir = true;

if(
!(isExplicitDir && turnIsPercent) // forcing in this case would cause weird growing in the opposite direction
!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction
&& (

@@ -324,7 +325,17 @@ (rawTaxiDir === DOWNWARD && pl < 0)

let d = turnIsPercent ? taxiTurnPfVal * l : taxiTurnPfVal * sgnL;
let d;
if( turnIsPercent ){
const p = taxiTurnPfVal < 0 ? (1 + taxiTurnPfVal) : (taxiTurnPfVal);
d = p * l;
} else {
const k = taxiTurnPfVal < 0 ? (l) : (0);
d = k + taxiTurnPfVal * sgnL;
}
const getIsTooClose = d => Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);
const isTooCloseSrc = getIsTooClose(d);
const isTooCloseTgt = getIsTooClose(l - Math.abs(d));
const isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d));
const isTooClose = isTooCloseSrc || isTooCloseTgt;

@@ -388,3 +399,3 @@

if( isVert ){
let y = (d < 0 ? posPts.y2 : posPts.y1) + d + (dIncludesNodeBody ? srcH/2 * sgnL : 0);
let y = posPts.y1 + d + (dIncludesNodeBody ? srcH/2 * sgnL : 0);
let { x1, x2 } = posPts;

@@ -397,3 +408,3 @@

} else { // horizontal
let x = (d < 0 ? posPts.x2 : posPts.x1) + d + (dIncludesNodeBody ? srcW/2 * sgnL : 0);
let x = posPts.x1 + d + (dIncludesNodeBody ? srcW/2 * sgnL : 0);
let { y1, y2 } = posPts;

@@ -400,0 +411,0 @@

@@ -26,3 +26,5 @@ var BRp = {};

|| shape === 'roundrectangle'
|| shape === 'round-rectangle'
|| shape === 'cutrectangle'
|| shape === 'cut-rectangle'
|| shape === 'barrel' ){

@@ -29,0 +31,0 @@ return shape;

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

return val1 != val2;
},
emptyNonEmpty: function( str1, str2 ){
const empty1 = is.emptyString(str1);
const empty2 = is.emptyString(str2);
return (empty1 && !empty2) || (!empty1 && empty2);
}

@@ -171,3 +177,3 @@ };

let mainLabel = [
{ name: 'label', type: t.text, triggersBounds: diff.any },
{ name: 'label', type: t.text, triggersBounds: diff.any, triggersZOrder: diff.emptyNonEmpty },
{ name: 'text-rotation', type: t.textRotation, triggersBounds: diff.any },

@@ -174,0 +180,0 @@ { name: 'text-margin-x', type: t.bidirectionalSize, triggersBounds: diff.any },

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