Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "chise", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "SBGNPD editing library", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -678,2 +678,35 @@ var options = require('./option-utilities').getOptions(); | ||
/* | ||
* Shows all elements (the ones which are hidden if any) and perform given layout afterward. Layout parameter may be layout options | ||
* or a function to call. Requires viewUtilities extension and considers undoable option. | ||
*/ | ||
mainUtilities.showAllAndPerformLayout = function(layoutparam) { | ||
var hiddenEles = cy.elements(':hidden'); | ||
if (hiddenEles.length === 0) { | ||
return; | ||
} | ||
if (!options.undoable) { | ||
var nodesWithHiddenNeighbor = cy.edges(":hidden").connectedNodes(':visible'); | ||
chise.thinBorder(nodesWithHiddenNeighbor); | ||
elementUtilities.showAndPerformLayout(hiddenEles, layoutparam); | ||
} | ||
else { | ||
var param = { | ||
eles: hiddenEles, | ||
layoutparam: layoutparam, | ||
firstTime: true | ||
}; | ||
var ur = cy.undoRedo(); | ||
ur.action("thickenBorder", chise.thickenBorder, chise.thinBorder); | ||
ur.action("thinBorder", chise.thinBorder, chise.thickenBorder); | ||
var actions = []; | ||
var nodesWithHiddenNeighbor = cy.nodes("[thickBorder]"); | ||
actions.push({name: "thinBorder", param: nodesWithHiddenNeighbor}); | ||
actions.push({name: "showAndPerformLayout", param: param}); | ||
cy.undoRedo().do("batch", actions); | ||
} | ||
}; | ||
/* | ||
* Unhide given eles (the ones which are hidden if any) and perform given layout afterward. Layout parameter may be layout options | ||
@@ -680,0 +713,0 @@ * or a function to call. Requires viewUtilities extension and considers undoable option. |
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
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
578558
16
7045
3