cytoscape-expand-collapse
Advanced tools
Comparing version 3.2.0 to 3.2.1
{ | ||
"name": "cytoscape-expand-collapse", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "This extension provides an interface to expand-collapse nodes.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -28,2 +28,3 @@ var debounce = require('./debounce'); | ||
var $canvas = document.createElement('canvas'); | ||
$canvas.classList.add("expand-collapse-canvas"); | ||
var $container = cy.container(); | ||
@@ -45,4 +46,4 @@ var ctx = $canvas.getContext( '2d' ); | ||
var _sizeCanvas = debounce(function () { | ||
$canvas.height = cy.height(); | ||
$canvas.width = cy.width(); | ||
$canvas.height = cy.container().offsetHeight; | ||
$canvas.width = cy.container().offsetWidth; | ||
$canvas.style.position = 'absolute'; | ||
@@ -80,5 +81,2 @@ $canvas.style.top = 0; | ||
// } | ||
window.addEventListener('resize', data.eWindowResize = function () { | ||
sizeCanvas(); | ||
}); | ||
@@ -207,2 +205,6 @@ function options() { | ||
{ | ||
cy.on('resize', data.eCyResize = function () { | ||
sizeCanvas(); | ||
}); | ||
cy.on('expandcollapse.clearvisualcue', function() { | ||
@@ -365,5 +367,4 @@ | ||
.off('free', 'node', data.eFree) | ||
.off('zoom pan', data.eZoom); | ||
window.removeEventListener('resize', data.eWindowResize); | ||
.off('zoom pan', data.eZoom) | ||
.off('resize', data.eCyResize); | ||
}, | ||
@@ -390,5 +391,4 @@ rebind: function () { | ||
.on('free', 'node', data.eFree) | ||
.on('zoom pan', data.eZoom); | ||
window.addEventListener('resize', data.eWindowResize); | ||
.on('zoom pan', data.eZoom) | ||
.on('resize', data.eCyResize); | ||
} | ||
@@ -395,0 +395,0 @@ }; |
@@ -28,3 +28,3 @@ module.exports = function (cy, api) { | ||
var currentPositions = {}; | ||
cy.nodes().positions(function (ele, i) { | ||
cy.nodes().not(":parent").positions(function (ele, i) { | ||
if(typeof ele === "number") { | ||
@@ -31,0 +31,0 @@ ele = i; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1419992
3616
2