hideGraphComponents(node) {
    this.resetGraphVisible();
    const componentName = node.name;
    const servicesOffered = node.routes.offers;
    d3.select('g').selectAll('circle').each(function(node) {
      if (node.name == componentName) {
        d3.select(this).style("stroke", "#ffaf49").style("stroke-width", "12");
        return;
      }
      const uses = servicesOffered.some(e => node.routes.uses.indexOf(e) >= 0);
      if (!uses) {
        d3.select(this).attr("visibility", "hidden");
      }
    });
    d3.select('g').selectAll('line').each(function(link) {
      if (link.source.name != componentName && link.target.name != componentName) {
        d3.select(this).attr("visibility", "hidden");
      }
    });
  }
/**
   * Hide components not related to the node.
   */
Hide components not related to the node.
Hide components not related to the node .
hideGraphComponents(node) {
    this.resetGraphVisible();
    const componentName = node.name;
    const servicesOffered = node.routes.offers;
    d3.select('g').selectAll('circle').each(function(node) {
      if (node.name == componentName) {
        d3.select(this).style("stroke", "#ffaf49").style("stroke-width", "12");
        return;
      }
      const uses = servicesOffered.some(e => node.routes.uses.indexOf(e) >= 0);
      if (!uses) {
        d3.select(this).attr("visibility", "hidden");
      }
    });
    d3.select('g').selectAll('line').each(function(link) {
      if (link.source.name != componentName && link.target.name != componentName) {
        d3.select(this).attr("visibility", "hidden");
      }
    });
  }
hideGraphComponents ( node ) { this . resetGraphVisible ( ) ; const componentName = node . name ; const servicesOffered = node . routes . offers ; d3 . select ( 'g' ) . selectAll ( 'circle' ) . each ( function ( node ) { if ( node . name == componentName ) { d3 . select ( this ) . style ( "stroke" , "#ffaf49" ) . style ( "stroke-width" , "12" ) ; return ; } const uses = servicesOffered . some ( e => node . routes . uses . indexOf ( e ) >= 0 ) ; if ( ! uses ) { d3 . select ( this ) . attr ( "visibility" , "hidden" ) ; } } ) ; d3 . select ( 'g' ) . selectAll ( 'line' ) . each ( function ( link ) { if ( link . source . name != componentName && link . target . name != componentName ) { d3 . select ( this ) . attr ( "visibility" , "hidden" ) ; } } ) ; }
Hide components not related to the node.
Hide components not related to the node .