cytoscape
Advanced tools
Comparing version 3.13.1 to 3.14.0
{ | ||
"build/cytoscape.umd.js": { | ||
"bundled": 927167, | ||
"minified": 343523, | ||
"gzipped": 106844 | ||
"bundled": 929588, | ||
"minified": 345279, | ||
"gzipped": 107536 | ||
}, | ||
"build/cytoscape.cjs.js": { | ||
"bundled": 854432, | ||
"minified": 362202, | ||
"gzipped": 109185 | ||
"bundled": 856719, | ||
"minified": 364159, | ||
"gzipped": 109864 | ||
}, | ||
"build/cytoscape.esm.js": { | ||
"bundled": 854259, | ||
"minified": 362059, | ||
"gzipped": 109151, | ||
"bundled": 856546, | ||
"minified": 364016, | ||
"gzipped": 109829, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 338173, | ||
"code": 339938, | ||
"import_statements": 51 | ||
}, | ||
"webpack": { | ||
"code": 340047 | ||
"code": 340848 | ||
} | ||
@@ -27,12 +27,12 @@ } | ||
"build/cytoscape.esm.min.js": { | ||
"bundled": 343338, | ||
"minified": 342848, | ||
"gzipped": 106676, | ||
"bundled": 344139, | ||
"minified": 344164, | ||
"gzipped": 107077, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 342324, | ||
"code": 343622, | ||
"import_statements": 0 | ||
}, | ||
"webpack": { | ||
"code": 343608 | ||
"code": 344409 | ||
} | ||
@@ -39,0 +39,0 @@ } |
{ | ||
"name": "cytoscape", | ||
"version": "3.13.1", | ||
"version": "3.14.0", | ||
"license": "MIT", | ||
@@ -109,5 +109,6 @@ "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", | ||
"release": "run-s copyright dist docs", | ||
"postpublish": "run-s docs:push", | ||
"watch": "run-s watch:fast", | ||
"watch:sync": "livereload \"build, debug\"", | ||
"watch:sync": "livereload -w 500 \"build, debug\"", | ||
"watch:http": "http-server -s -c -1 -o", | ||
@@ -142,3 +143,3 @@ "watch:fast": "run-p watch:sync watch:http watch:build:fast", | ||
"cpy-cli": "^3.0.0", | ||
"cross-env": "^6.0.0", | ||
"cross-env": "^7.0.0", | ||
"download-cli": "^1.0.5", | ||
@@ -152,5 +153,5 @@ "eslint": "^6.0.0", | ||
"jsonlint": "^1.6.2", | ||
"livereload": "^0.8.2", | ||
"livereload": "^0.9.0", | ||
"marked": "^0.8.0", | ||
"mocha": "^6.2.2", | ||
"mocha": "^7.0.1", | ||
"npm-run-all": "^4.1.5", | ||
@@ -164,3 +165,3 @@ "rimraf": "^3.0.0", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-size-snapshot": "^0.10.0", | ||
"rollup-plugin-size-snapshot": "^0.11.0", | ||
"rollup-plugin-terser": "^5.1.3" | ||
@@ -167,0 +168,0 @@ }, |
@@ -19,2 +19,3 @@ import * as util from '../../util'; | ||
import hopcroftTarjanBiconnected from './hopcroft-tarjan-biconnected'; | ||
import tarjanStronglyConnected from './tarjan-strongly-connected'; | ||
@@ -40,3 +41,4 @@ var elesfn = {}; | ||
hierholzer, | ||
hopcroftTarjanBiconnected | ||
hopcroftTarjanBiconnected, | ||
tarjanStronglyConnected | ||
].forEach(function(props) { | ||
@@ -43,0 +45,0 @@ util.extend(elesfn, props); |
@@ -268,5 +268,5 @@ import * as math from '../../../../math'; | ||
const taxiTurn = edge.pstyle('taxi-turn'); | ||
const taxiTurnPfVal = taxiTurn.pfValue; | ||
const turnIsPercent = taxiTurn.units === '%'; | ||
const taxiTurnPfVal = turnIsPercent && taxiTurn.pfValue < 0 ? 1 + taxiTurn.pfValue : taxiTurn.pfValue; | ||
let minD = edge.pstyle('taxi-turn-min-distance').pfValue; | ||
const turnIsPercent = taxiTurn.units === '%'; | ||
const dw = (dIncludesNodeBody ? (srcW + tgtW)/2 : 0); | ||
@@ -326,3 +326,3 @@ const dh = (dIncludesNodeBody ? (srcH + tgtH)/2 : 0); | ||
const isTooCloseSrc = getIsTooClose(d); | ||
const isTooCloseTgt = getIsTooClose(l - d); | ||
const isTooCloseTgt = getIsTooClose(l - Math.abs(d)); | ||
const isTooClose = isTooCloseSrc || isTooCloseTgt; | ||
@@ -386,3 +386,3 @@ | ||
if( isVert ){ | ||
let y = posPts.y1 + d + (dIncludesNodeBody ? srcH/2 * sgnL : 0); | ||
let y = (d < 0 ? posPts.y2 : posPts.y1) + d + (dIncludesNodeBody ? srcH/2 * sgnL : 0); | ||
let { x1, x2 } = posPts; | ||
@@ -395,3 +395,3 @@ | ||
} else { // horizontal | ||
let x = posPts.x1 + d + (dIncludesNodeBody ? srcW/2 * sgnL : 0); | ||
let x = (d < 0 ? posPts.x2 : posPts.x1) + d + (dIncludesNodeBody ? srcW/2 * sgnL : 0); | ||
let { y1, y2 } = posPts; | ||
@@ -398,0 +398,0 @@ |
@@ -1,16 +0,16 @@ | ||
var BRp = {}; | ||
let BRp = {}; | ||
BRp.registerCalculationListeners = function(){ | ||
var cy = this.cy; | ||
var elesToUpdate = cy.collection(); | ||
var r = this; | ||
let cy = this.cy; | ||
let elesToUpdate = cy.collection(); | ||
let r = this; | ||
var enqueue = function( eles, dirtyStyleCaches = true ){ | ||
let enqueue = function( eles, dirtyStyleCaches = true ){ | ||
elesToUpdate.merge( eles ); | ||
if( dirtyStyleCaches ){ | ||
for( var i = 0; i < eles.length; i++ ){ | ||
var ele = eles[i]; | ||
var _p = ele._private; | ||
var rstyle = _p.rstyle; | ||
for( let i = 0; i < eles.length; i++ ){ | ||
let ele = eles[i]; | ||
let _p = ele._private; | ||
let rstyle = _p.rstyle; | ||
@@ -25,3 +25,3 @@ rstyle.clean = false; | ||
.on('bounds.* dirty.*', function onDirtyBounds( e ){ | ||
var ele = e.target; | ||
let ele = e.target; | ||
@@ -32,3 +32,3 @@ enqueue( ele ); | ||
.on('style.* background.*', function onDirtyStyle( e ){ | ||
var ele = e.target; | ||
let ele = e.target; | ||
@@ -39,9 +39,9 @@ enqueue( ele, false ); | ||
var updateEleCalcs = function( willDraw ){ | ||
let updateEleCalcs = function( willDraw ){ | ||
if( willDraw ){ | ||
var fns = r.onUpdateEleCalcsFns; | ||
let fns = r.onUpdateEleCalcsFns; | ||
for( var i = 0; i < elesToUpdate.length; i++ ){ | ||
var ele = elesToUpdate[i]; | ||
var rstyle = ele._private.rstyle; | ||
for( let i = 0; i < elesToUpdate.length; i++ ){ | ||
let ele = elesToUpdate[i]; | ||
let rstyle = ele._private.rstyle; | ||
@@ -55,4 +55,4 @@ if( ele.isNode() && !rstyle.cleanConnected ){ | ||
if( fns ){ for( var i = 0; i < fns.length; i++ ){ | ||
var fn = fns[i]; | ||
if( fns ){ for( let i = 0; i < fns.length; i++ ){ | ||
let fn = fns[i]; | ||
@@ -76,3 +76,3 @@ fn( willDraw, elesToUpdate ); | ||
BRp.onUpdateEleCalcs = function( fn ){ | ||
var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; | ||
let fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; | ||
@@ -94,6 +94,6 @@ fns.push( fn ); | ||
for( var i = 0; i < eles.length; i++ ){ | ||
var ele = eles[ i ]; | ||
var _p = ele._private; | ||
var rstyle = _p.rstyle; | ||
for( let i = 0; i < eles.length; i++ ){ | ||
let ele = eles[ i ]; | ||
let _p = ele._private; | ||
let rstyle = _p.rstyle; | ||
@@ -122,7 +122,7 @@ // an edge may be implicitly dirty b/c of one of its connected nodes | ||
// update node data from projections | ||
for( var i = 0; i < nodes.length; i++ ){ | ||
var ele = nodes[i]; | ||
var _p = ele._private; | ||
var rstyle = _p.rstyle; | ||
var pos = ele.position(); | ||
for( let i = 0; i < nodes.length; i++ ){ | ||
let ele = nodes[i]; | ||
let _p = ele._private; | ||
let rstyle = _p.rstyle; | ||
let pos = ele.position(); | ||
@@ -140,7 +140,7 @@ this.recalculateNodeLabelProjection( ele ); | ||
// update edge data from projections | ||
for( var i = 0; i < edges.length; i++ ){ | ||
var ele = edges[ i ]; | ||
var _p = ele._private; | ||
var rstyle = _p.rstyle; | ||
var rs = _p.rscratch; | ||
for( let i = 0; i < edges.length; i++ ){ | ||
let ele = edges[ i ]; | ||
let _p = ele._private; | ||
let rstyle = _p.rstyle; | ||
let rs = _p.rscratch; | ||
@@ -147,0 +147,0 @@ // update rstyle positions |
@@ -39,2 +39,3 @@ import * as util from '../util'; | ||
bidirectionalSize: { number: true }, // allows negative | ||
bidirectionalSizeMaybePercent: { number: true, allowPercent: true }, // allows negative | ||
bidirectionalSizes: { number: true, multiple: true }, // allows negative | ||
@@ -329,3 +330,3 @@ sizeMaybePercent: { number: true, min: 0, allowPercent: true }, | ||
{ name: 'segment-weights', type: t.numbers, triggersBounds: diff.any }, | ||
{ name: 'taxi-turn', type: t.sizeMaybePercent, triggersBounds: diff.any }, | ||
{ name: 'taxi-turn', type: t.bidirectionalSizeMaybePercent, triggersBounds: diff.any }, | ||
{ name: 'taxi-turn-min-distance', type: t.size, triggersBounds: diff.any }, | ||
@@ -332,0 +333,0 @@ { name: 'taxi-direction', type: t.axisDirection, 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
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
4225619
171
106655