cytoscape
Advanced tools
Comparing version 3.8.3 to 3.8.4
{ | ||
"build/cytoscape.umd.js": { | ||
"bundled": 902980, | ||
"minified": 335304, | ||
"gzipped": 104132 | ||
"bundled": 903208, | ||
"minified": 335345, | ||
"gzipped": 104149 | ||
}, | ||
"build/cytoscape.cjs.js": { | ||
"bundled": 831513, | ||
"minified": 353080, | ||
"gzipped": 106328 | ||
"bundled": 831729, | ||
"minified": 353155, | ||
"gzipped": 106362 | ||
}, | ||
"build/cytoscape.esm.js": { | ||
"bundled": 831340, | ||
"minified": 352937, | ||
"gzipped": 106291, | ||
"bundled": 831556, | ||
"minified": 353012, | ||
"gzipped": 106326, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 329957, | ||
"code": 329998, | ||
"import_statements": 51 | ||
}, | ||
"webpack": { | ||
"code": 331824 | ||
"code": 331865 | ||
} | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "cytoscape", | ||
"version": "3.8.3", | ||
"version": "3.8.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation", |
@@ -837,3 +837,3 @@ import * as math from '../../../../math'; | ||
( src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild() ) && | ||
( src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) ) | ||
( src.parents().anySame(tgt) || tgt.parents().anySame(src) || (src.same(tgt) && src.isParent()) ) | ||
){ | ||
@@ -840,0 +840,0 @@ this.findCompoundLoopPoints(edge, passedPairInfo, i, edgeIsUnbundled); |
@@ -548,2 +548,9 @@ export const arePositionsSame = ( p1, p2 ) => | ||
var epsilon = 0.00001; | ||
// avoid division by zero while keeping the overall expression close in value | ||
if( a === 0 ){ | ||
a = epsilon; | ||
} | ||
b /= a; | ||
@@ -550,0 +557,0 @@ c /= a; |
@@ -278,5 +278,6 @@ import * as util from '../util'; | ||
// - raise up small numbers so more significant digits are seen by hashing | ||
// - make small numbers negative to avoid collisions -- most style values are positive numbers | ||
// - make small numbers larger than a normal value to avoid collisions | ||
// - works in practice and it's relatively cheap | ||
let cleanNum = val => (-128 < val && val < 128) && Math.floor(val) !== val ? -((val * 1024) | 0) : val; | ||
let N = 2000000000; | ||
let cleanNum = val => (-128 < val && val < 128) && Math.floor(val) !== val ? N - ((val * 1024) | 0) : val; | ||
@@ -283,0 +284,0 @@ for( let i = 0; i < propNames.length; i++ ){ |
@@ -1,2 +0,4 @@ | ||
export const hashIterableInts = function( iterator, seed = 5381 ){ // djb2/string-hash | ||
const DEFAULT_SEED = 5381; | ||
export const hashIterableInts = function( iterator, seed = DEFAULT_SEED ){ // djb2/string-hash | ||
let hash = seed; | ||
@@ -10,10 +12,10 @@ let entry; | ||
hash = (hash * 33) ^ entry.value; | ||
hash = ((hash << 5) + hash + entry.value) | 0; | ||
} | ||
return hash >>> 0; | ||
return hash; | ||
}; | ||
export const hashInt = function( num, seed = 5381 ){ // djb2/string-hash | ||
return ( (seed * 33) ^ num ) >>> 0; | ||
export const hashInt = function( num, seed = DEFAULT_SEED ){ // djb2/string-hash | ||
return ((seed << 5) + seed + num) | 0; | ||
}; | ||
@@ -20,0 +22,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3767258
102464