diff --git a/app/js/app-cy.js b/app/js/app-cy.js index e2b2d35e..f5f205f6 100644 --- a/app/js/app-cy.js +++ b/app/js/app-cy.js @@ -314,7 +314,7 @@ module.exports = function (chiseInstance) { id: 'ctx-menu-fit-content-into-node', content: 'Resize Node to Content', selector: 'node[class^="macromolecule"],[class^="complex"],[class^="simple chemical"],[class^="nucleic acid feature"],' + - '[class^="unspecified entity"], [class^="perturbing agent"],[class^="phenotype"],[class^="tag"],[class^="compartment"],[class^="submap"],[class^="BA"],[class="SIF macromolecule"],[class="SIF simple chemical"]', + '[class^="unspecified entity"], [class^="perturbing agent"],[class^="phenotype"],[class^="tag"],[class^="compartment"],[class^="submap"],[class^="BA"],[class="SIF macromolecule"],[class="SIF simple chemical"],[class^="gene"],[class^="rna"],[class^="protein"],[class^="truncated protein"],[class^="ion"],[class^="receptor"],[class^="simple molecule"],[class^="unknown molecule"],[class^="drug"]', onClickFunction: function (event) { var cyTarget = event.target || event.cyTarget; //Collection holds the element and is used to generalize resizeNodeToContent function (which is used from Edit-> Menu) @@ -596,12 +596,12 @@ module.exports = function (chiseInstance) { resizeToContentCueEnabled: function (node){ var enabled_classes = ["macromolecule", "complex", "simple chemical", "nucleic acid feature", - "unspecified entity", "perturbing agent", "phenotype", "tag", "compartment", "submap", "BA"]; + "unspecified entity", "perturbing agent", "phenotype", "tag", "compartment", "submap", "BA", "gene", "rna", "protein", "ion channel", "receptor", "simple molecule", "unknown molecule", "drug"]; var node_class = node.data('class'); var result = false; enabled_classes.forEach(function(enabled_class){ - if(node_class.indexOf(enabled_class) > -1) + if(node_class.indexOf(enabled_class) > -1 || node_class == "ion") result = true; }); diff --git a/app/js/app-menu.js b/app/js/app-menu.js index e93df858..463a87f2 100644 --- a/app/js/app-menu.js +++ b/app/js/app-menu.js @@ -1129,7 +1129,7 @@ module.exports = function() { var cy = chiseInstance.getCy(); //Remove processes and other nodes which cannot be resized according to content - var toBeResized = cy.nodes().difference('node[class*="process"],[class*="association"],[class*="dissociation"],[class="empty set"],[class="and"],[class="or"],[class="not"],[class="delay"],:parent'); + var toBeResized = cy.nodes().difference('node[class*="process"],[class*="association"],[class*="dissociation"],[class="empty set"],[class="and"],[class="or"],[class="not"],[class="delay"],[class="degradation"],[class="unknown logical operator"],:parent'); appUtilities.resizeNodesToContent(toBeResized);