cytoscape
Advanced tools
Comparing version 3.7.1 to 3.7.2
{ | ||
"build/cytoscape.umd.js": { | ||
"bundled": 904905, | ||
"minified": 334463, | ||
"gzipped": 103813 | ||
"bundled": 905720, | ||
"minified": 334781, | ||
"gzipped": 103904 | ||
}, | ||
"build/cytoscape.cjs.js": { | ||
"bundled": 833336, | ||
"minified": 355157, | ||
"gzipped": 106733 | ||
"bundled": 834101, | ||
"minified": 355531, | ||
"gzipped": 106826 | ||
}, | ||
"build/cytoscape.esm.js": { | ||
"bundled": 833163, | ||
"minified": 355014, | ||
"gzipped": 106700, | ||
"bundled": 833928, | ||
"minified": 355388, | ||
"gzipped": 106791, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 328968, | ||
"code": 329287, | ||
"import_statements": 51 | ||
}, | ||
"webpack": { | ||
"code": 330976 | ||
"code": 331295 | ||
} | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "cytoscape", | ||
"version": "3.7.1", | ||
"version": "3.7.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation", |
@@ -1305,4 +1305,4 @@ /* | ||
if( !n.isLocked ){ | ||
n.positionX += x; | ||
n.positionY += y; | ||
n.positionX += (x - c.x1); | ||
n.positionY += (y - c.y1); | ||
} | ||
@@ -1309,0 +1309,0 @@ } |
@@ -598,3 +598,26 @@ import * as math from '../../../../math'; | ||
let hasCompounds = cy.hasCompoundNodes(); | ||
let hashTable = new Map(); | ||
let hashTable = { | ||
map: new Map(), | ||
get: function(pairId){ | ||
let map2 = this.map.get(pairId[0]); | ||
if( map2 != null ){ | ||
return map2.get(pairId[1]); | ||
} else { | ||
return null; | ||
} | ||
}, | ||
set: function(pairId, val){ | ||
let map2 = this.map.get(pairId[0]); | ||
if( map2 == null ){ | ||
map2 = new Map(); | ||
this.map.set(pairId[0], map2); | ||
} | ||
map2.set(pairId[1], val); | ||
} | ||
}; | ||
let pairIds = []; | ||
@@ -622,7 +645,8 @@ let haystackEdges = []; | ||
let edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; | ||
let srcIndex = _p.source.poolIndex(); | ||
let tgtIndex = _p.target.poolIndex(); | ||
let src = _p.source; | ||
let tgt = _p.target; | ||
let srcIndex = src.poolIndex(); | ||
let tgtIndex = tgt.poolIndex(); | ||
let hash = (edgeIsUnbundled ? -1 : 1) * util.hashIntsArray([ srcIndex, tgtIndex ].sort()); | ||
let pairId = hash; | ||
let pairId = [ srcIndex, tgtIndex ].sort(); | ||
@@ -629,0 +653,0 @@ let tableEntry = hashTable.get( pairId ); |
@@ -11,3 +11,3 @@ /* global Path2D */ | ||
if( !edge.visible() ){ return; } | ||
if( shouldDrawOpacity && !edge.visible() ){ return; } | ||
@@ -14,0 +14,0 @@ // if bezier ctrl pts can not be calculated, then die |
@@ -25,3 +25,3 @@ import * as math from '../../../math'; | ||
CRp.drawCachedElementPortion = function( context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation ){ | ||
CRp.drawCachedElementPortion = function( context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity ){ | ||
let r = this; | ||
@@ -35,3 +35,3 @@ let bb = eleTxrCache.getBoundingBox(ele); | ||
if( eleCache != null ){ | ||
let opacity = ele.effectiveOpacity(); | ||
let opacity = getOpacity(r, ele); | ||
@@ -94,2 +94,4 @@ if( opacity === 0 ){ return; } | ||
const getTargetLabelRotation = (r, ele) => r.getTextAngle(ele, 'target'); | ||
const getOpacity = (r, ele) => ele.effectiveOpacity(); | ||
const getTextOpacity = (e, ele) => ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); | ||
@@ -106,8 +108,8 @@ CRp.drawCachedElement = function( context, ele, pxRatio, extent, lvl, requestHighQuality ){ | ||
if( !extent || math.boundingBoxesIntersect( bb, extent ) ){ | ||
r.drawCachedElementPortion( context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation ); | ||
r.drawCachedElementPortion( context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation ); | ||
r.drawCachedElementPortion( context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity ); | ||
r.drawCachedElementPortion( context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity ); | ||
if( ele.isEdge() ){ | ||
r.drawCachedElementPortion( context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation ); | ||
r.drawCachedElementPortion( context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation ); | ||
r.drawCachedElementPortion( context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity ); | ||
r.drawCachedElementPortion( context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity ); | ||
} | ||
@@ -114,0 +116,0 @@ |
@@ -29,3 +29,3 @@ import * as util from '../../../util'; | ||
if( force == null ){ | ||
if( !r.eleTextBiggerThanMin( ele ) ){ return; } | ||
if( useEleOpacity && !r.eleTextBiggerThanMin( ele ) ){ return; } | ||
} else if( force === false ){ | ||
@@ -116,3 +116,3 @@ return; | ||
let labelWeight = ele.pstyle( 'font-weight' ).strValue; | ||
let opacity = ele.pstyle('text-opacity').value * (useEleOpacity ? ele.effectiveOpacity() : 1); | ||
let opacity = (useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1); | ||
let outlineOpacity = ele.pstyle( 'text-outline-opacity' ).value * opacity; | ||
@@ -171,3 +171,3 @@ let color = ele.pstyle( 'color' ).value; | ||
if( parentOpacity === 0 || ele.pstyle( 'text-opacity' ).value === 0 ){ | ||
if( useEleOpacity && (parentOpacity === 0 || ele.pstyle( 'text-opacity' ).value === 0) ){ | ||
return; | ||
@@ -174,0 +174,0 @@ } |
@@ -19,3 +19,3 @@ /* global Path2D */ | ||
if( !node.visible() ){ return; } | ||
if( shouldDrawOpacity && !node.visible() ){ return; } | ||
@@ -22,0 +22,0 @@ let eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
3771805
164
102614
1