cytoscape
Advanced tools
Comparing version 3.29.3 to 3.30.0
{ | ||
"name": "cytoscape", | ||
"version": "3.29.3", | ||
"version": "3.30.0", | ||
"license": "MIT", | ||
@@ -106,3 +106,3 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation", | ||
"chai": "^4.1.2", | ||
"cpy-cli": "^3.1.1", | ||
"cpy-cli": "^5.0.0", | ||
"cross-env": "^7.0.0", | ||
@@ -112,3 +112,3 @@ "download-cli": "^1.0.5", | ||
"esm": "^3.2.25", | ||
"gh-pages": "^2.1.1", | ||
"gh-pages": "^5.0.0", | ||
"handlebars": "^4.7.6", | ||
@@ -115,0 +115,0 @@ "heap": "^0.2.7", |
@@ -5,4 +5,2 @@ import * as math from '../../../../math'; | ||
/* global document */ | ||
let BRp = {}; | ||
@@ -473,2 +471,6 @@ | ||
var containerWindow = r.cy.window(); | ||
var document = containerWindow.document; | ||
let cacheKey = util.hashString( text, ele._private.labelDimsKey ); | ||
@@ -475,0 +477,0 @@ |
@@ -7,3 +7,3 @@ import * as is from '../../../is'; | ||
/* global document, window, ResizeObserver, MutationObserver */ | ||
/* global document, ResizeObserver, MutationObserver */ | ||
@@ -1388,3 +1388,3 @@ BRp.registerBinding = function( target, event, handler, useCapture ){ // eslint-disable-line no-unused-vars | ||
var touchmoveHandler; | ||
r.registerBinding(window, 'touchmove', touchmoveHandler = function(e) { // eslint-disable-line no-undef | ||
r.registerBinding(containerWindow, 'touchmove', touchmoveHandler = function(e) { // eslint-disable-line no-undef | ||
var capture = r.touchData.capture; | ||
@@ -1391,0 +1391,0 @@ |
@@ -33,2 +33,4 @@ /* global Path2D */ | ||
let lineCap = edge.pstyle('line-cap').value; | ||
let lineOutlineWidth = edge.pstyle('line-outline-width').value; | ||
let lineOutlineColor = edge.pstyle('line-outline-color').value; | ||
@@ -63,2 +65,32 @@ let effectiveLineOpacity = opacity * lineOpacity; | ||
let drawLineOutline = ( strokeOpacity = effectiveLineOpacity) => { | ||
context.lineWidth = edgeWidth + lineOutlineWidth; | ||
context.lineCap = lineCap; | ||
if (lineOutlineWidth > 0) { | ||
r.colorStrokeStyle( context, lineOutlineColor[0], lineOutlineColor[1], lineOutlineColor[2], strokeOpacity ); | ||
} else { | ||
// do not draw any lineOutline | ||
context.lineCap = 'butt'; // reset for other drawing functions | ||
return; | ||
} | ||
if (curveStyle === 'straight-triangle') { | ||
r.drawEdgeTrianglePath( | ||
edge, | ||
context, | ||
rs.allpts | ||
); | ||
} else { | ||
r.drawEdgePath( | ||
edge, | ||
context, | ||
rs.allpts, | ||
lineStyle | ||
); | ||
context.lineCap = 'butt'; // reset for other drawing functions | ||
} | ||
}; | ||
let drawOverlay = () => { | ||
@@ -100,2 +132,4 @@ if( !shouldDrawOverlay ){ return; } | ||
context.translate( -gx, -gy ); | ||
} else { | ||
drawLineOutline(); | ||
} | ||
@@ -102,0 +136,0 @@ |
@@ -17,2 +17,4 @@ import * as util from '../../../util'; | ||
var containerWindow = this.cy.window(); | ||
var backingStore = context.backingStorePixelRatio || | ||
@@ -25,3 +27,3 @@ context.webkitBackingStorePixelRatio || | ||
return (window.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef | ||
return (containerWindow.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef | ||
}; | ||
@@ -28,0 +30,0 @@ |
@@ -44,2 +44,5 @@ /* | ||
var containerWindow = r.cy.window(); | ||
var document = containerWindow.document; | ||
r.data = { | ||
@@ -318,2 +321,4 @@ canvases: new Array( CRp.CANVAS_LAYERS ), | ||
} else { | ||
var containerWindow = this.cy.window(); | ||
var document = containerWindow.document; | ||
canvas = document.createElement('canvas'); // eslint-disable-line no-undef | ||
@@ -320,0 +325,0 @@ canvas.width = width; |
@@ -360,2 +360,4 @@ import * as util from '../util'; | ||
{ name: 'line-dash-offset', type: t.number }, | ||
{ name: 'line-outline-width', type: t.size }, | ||
{ name: 'line-outline-color', type: t.color }, | ||
{ name: 'line-gradient-stop-colors', type: t.colors }, | ||
@@ -721,2 +723,4 @@ { name: 'line-gradient-stop-positions', type: t.percentages }, | ||
'line-opacity' : 1, | ||
'line-outline-width' : 0, | ||
'line-outline-color' : '#000', | ||
'line-gradient-stop-colors': '#999', | ||
@@ -723,0 +727,0 @@ 'line-gradient-stop-positions': '0%', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1
4622723
118069