public/js/app.js
//(but when nav is opened/closed render function is called directly)
(but when nav is opened/closed render function is called directly)
( but when nav is opened / closed render function is called directly )
function preRenderNav() {
      $("nav.nav").empty();
      this.cluster = d3.layout.tree()
        .separation(function(a, b) { return (a.parent == b.parent ? 1 : 2) / a.depth; });
      this.diagonal = d3.svg.diagonal.radial()
        .projection( function(d) { return [d.y, d.x / 180 * Math.PI]; } );
      this.svg = d3.select("#vizskos .nav");
      this.vis = this.svg.append("svg:svg");
      this.main = this.vis
        .append("svg:g")
          .attr("class", "main " + this.collection.getActiveThesaurus().named_id);
      this.partition = d3.layout.partition()
        .value(function(d) { return d.size; });
      this.arc = this.main.append("svg:path")
        .attr("class", "arc");
      this.setSize();
      if(this.root) this.render(this.root);
    }
function preRenderNav ( ) { $ ( "nav.nav" ) . empty ( ) ; this . cluster = d3 . layout . tree ( ) . separation ( function ( a , b ) { return ( a . parent == b . parent ? 1 : 2 ) / a . depth ; } ) ; this . diagonal = d3 . svg . diagonal . radial ( ) . projection ( function ( d ) { return [ d . y , d . x / 180 * Math . PI ] ; } ) ; this . svg = d3 . select ( "#vizskos .nav" ) ; this . vis = this . svg . append ( "svg:svg" ) ; this . main = this . vis . append ( "svg:g" ) . attr ( "class" , "main " + this . collection . getActiveThesaurus ( ) . named_id ) ; this . partition = d3 . layout . partition ( ) . value ( function ( d ) { return d . size ; } ) ; this . arc = this . main . append ( "svg:path" ) . attr ( "class" , "arc" ) ; this . setSize ( ) ; if ( this . root ) this . render ( this . root ) ; }
(but when nav is opened/closed render function is called directly)
( but when nav is opened / closed render function is called directly )
//remove previous //creates tree circular projection //main svg node //node containing all other //partition view //white circle (decorative) //apply size to elements //call render function