components/utils/scripts/jit.js
function getNodesToHide(node) {
      node = node || this.clickedNode;
      if(!this.config.constrained) {
        return [];
      }
      var Geom = this.geom;
      var graph = this.graph;
      var canvas = this.canvas;
      var level = node._depth, nodeArray = [];
  	  graph.eachNode(function(n) {
          if(n.exist && !n.selected) {
              if(n.isDescendantOf(node.id)) {
                if(n._depth <= level) nodeArray.push(n);
              } else {
                nodeArray.push(n);
              }
          }
  	  });
  	  var leafLevel = Geom.getRightLevelToShow(node, canvas);
  	  node.eachLevel(leafLevel, leafLevel, function(n) {
          if(n.exist && !n.selected) nodeArray.push(n);
  	  });
  	    
  	  for (var i = 0; i < nodesInPath.length; i++) {
  	    var n = this.graph.getNode(nodesInPath[i]);
  	    if(!n.isDescendantOf(node.id)) {
  	      nodeArray.push(n);
  	    }
  	  } 
  	  return nodeArray;       
    }
function getNodesToHide(node) {
      node = node || this.clickedNode;
      if(!this.config.constrained) {
        return [];
      }
      var Geom = this.geom;
      var graph = this.graph;
      var canvas = this.canvas;
      var level = node._depth, nodeArray = [];
  	  graph.eachNode(function(n) {
          if(n.exist && !n.selected) {
              if(n.isDescendantOf(node.id)) {
                if(n._depth <= level) nodeArray.push(n);
              } else {
                nodeArray.push(n);
              }
          }
  	  });
  	  var leafLevel = Geom.getRightLevelToShow(node, canvas);
  	  node.eachLevel(leafLevel, leafLevel, function(n) {
          if(n.exist && !n.selected) nodeArray.push(n);
  	  });
  	    
  	  for (var i = 0; i < nodesInPath.length; i++) {
  	    var n = this.graph.getNode(nodesInPath[i]);
  	    if(!n.isDescendantOf(node.id)) {
  	      nodeArray.push(n);
  	    }
  	  } 
  	  return nodeArray;       
    }
function getNodesToHide ( node ) { node = node || this . clickedNode ; if ( ! this . config . constrained ) { return [ ] ; } var Geom = this . geom ; var graph = this . graph ; var canvas = this . canvas ; var level = node . _depth , nodeArray = [ ] ; graph . eachNode ( function ( n ) { if ( n . exist && ! n . selected ) { if ( n . isDescendantOf ( node . id ) ) { if ( n . _depth <= level ) nodeArray . push ( n ) ; } else { nodeArray . push ( n ) ; } } } ) ; var leafLevel = Geom . getRightLevelToShow ( node , canvas ) ; node . eachLevel ( leafLevel , leafLevel , function ( n ) { if ( n . exist && ! n . selected ) nodeArray . push ( n ) ; } ) ; for ( var i = 0 ; i < nodesInPath . length ; i ++ ) { var n = this . graph . getNode ( nodesInPath [ i ] ) ; if ( ! n . isDescendantOf ( node . id ) ) { nodeArray . push ( n ) ; } } return nodeArray ; }
Nodes to contract
Nodes to contract