cytoscape
Advanced tools
Comparing version 3.8.4 to 3.8.5
{ | ||
"build/cytoscape.umd.js": { | ||
"bundled": 903208, | ||
"minified": 335345, | ||
"gzipped": 104149 | ||
"bundled": 903458, | ||
"minified": 335515, | ||
"gzipped": 104187 | ||
}, | ||
"build/cytoscape.cjs.js": { | ||
"bundled": 831729, | ||
"minified": 353155, | ||
"gzipped": 106362 | ||
"bundled": 831963, | ||
"minified": 353337, | ||
"gzipped": 106395 | ||
}, | ||
"build/cytoscape.esm.js": { | ||
"bundled": 831556, | ||
"minified": 353012, | ||
"gzipped": 106326, | ||
"bundled": 831790, | ||
"minified": 353194, | ||
"gzipped": 106362, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 329998, | ||
"code": 330168, | ||
"import_statements": 51 | ||
}, | ||
"webpack": { | ||
"code": 331865 | ||
"code": 332035 | ||
} | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "cytoscape", | ||
"version": "3.8.4", | ||
"version": "3.8.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation", |
@@ -107,2 +107,14 @@ import * as util from '../../util'; | ||
elesfn.paddedHeight = function(){ | ||
let ele = this[0]; | ||
return ele.height() + (2 * ele.padding()); | ||
}; | ||
elesfn.paddedWidth = function(){ | ||
let ele = this[0]; | ||
return ele.width() + (2 * ele.padding()); | ||
}; | ||
export default elesfn; |
@@ -68,3 +68,3 @@ import * as util from '../../../util'; | ||
let pos = usePaths ? {x: 0, y: 0 } : ele.position(), | ||
width = ele.width(), height = ele.height(); | ||
width = ele.paddedWidth(), height = ele.paddedHeight(); | ||
gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); | ||
@@ -78,6 +78,7 @@ } | ||
} else { | ||
let pos = usePaths ? {x: 0, y: 0 } : ele.position(), | ||
width = ele.width(), height = ele.height(), | ||
let pos = usePaths ? { x: 0, y: 0 } : ele.position(), | ||
width = ele.paddedWidth(), height = ele.paddedHeight(), | ||
halfWidth = width / 2, halfHeight = height / 2; | ||
let direction = ele.pstyle('background-gradient-direction').value; | ||
switch (direction) { | ||
@@ -91,6 +92,6 @@ case 'to-bottom': | ||
case 'to-left': | ||
gradientStyle = context.createLinearGradient(pos.x - halfWidth, pos.y, pos.x + halfWidth, pos.y); | ||
gradientStyle = context.createLinearGradient(pos.x + halfWidth, pos.y, pos.x - halfWidth, pos.y); | ||
break; | ||
case 'to-right': | ||
gradientStyle = context.createLinearGradient(pos.x + halfWidth, pos.y, pos.x - halfWidth, pos.y); | ||
gradientStyle = context.createLinearGradient(pos.x - halfWidth, pos.y, pos.x + halfWidth, pos.y); | ||
break; | ||
@@ -97,0 +98,0 @@ case 'to-bottom-right': |
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
3768467
165
102497