external/bbop.js
function dblclick_event_handler(event){

	    var phynode_id = this.id;

	    // If this is the first double click here...
	    var pn = get_pnode_from_phynode_id(phynode_id);
	    if( pn.open == true ){
		
		// "Vanish" edges.
		var subtree_edges = get_descendant_connections(phynode_id);
		for( var se = 0; se < subtree_edges.length; se++ ){
		    var ste = subtree_edges[se];
		    ste.visible = false;
		    ste.update();
		}

		// "Vanish" nodes and text; not this node though...
		var subtree_nodes = get_descendant_phynodes(phynode_id);
		for( var sn = 0; sn < subtree_nodes.length; sn++ ){
		    var stn = subtree_nodes[sn];
		    if( stn.id != phynode_id ){
			// Turn of visibilty for children.
			stn.visible = false;
		    }else{
			// Mark self as closed.
			stn.open = false;
		    }
		    stn.update();
		}
	    }else{ //Otherwise...
		
		// Reestablish edges.
		var subtree_edges = get_descendant_connections(phynode_id);
		for( var se = 0; se < subtree_edges.length; se++ ){
		    var ste = subtree_edges[se];
		    ste.visible = true;
		    ste.update();
		}

		// Restablish pnodes; clear all history.
		var subtree_nodes = get_descendant_phynodes(phynode_id);
		for( var sn = 0; sn < subtree_nodes.length; sn++ ){
		    var stn = subtree_nodes[sn];
		    stn.open = true;
		    stn.visible = true;
		    stn.update();
		}
	    }
	}
function dblclick_event_handler(event){

	    var phynode_id = this.id;

	    // If this is the first double click here...
	    var pn = get_pnode_from_phynode_id(phynode_id);
	    if( pn.open == true ){
		
		// "Vanish" edges.
		var subtree_edges = get_descendant_connections(phynode_id);
		for( var se = 0; se < subtree_edges.length; se++ ){
		    var ste = subtree_edges[se];
		    ste.visible = false;
		    ste.update();
		}

		// "Vanish" nodes and text; not this node though...
		var subtree_nodes = get_descendant_phynodes(phynode_id);
		for( var sn = 0; sn < subtree_nodes.length; sn++ ){
		    var stn = subtree_nodes[sn];
		    if( stn.id != phynode_id ){
			// Turn of visibilty for children.
			stn.visible = false;
		    }else{
			// Mark self as closed.
			stn.open = false;
		    }
		    stn.update();
		}
	    }else{ //Otherwise...
		
		// Reestablish edges.
		var subtree_edges = get_descendant_connections(phynode_id);
		for( var se = 0; se < subtree_edges.length; se++ ){
		    var ste = subtree_edges[se];
		    ste.visible = true;
		    ste.update();
		}

		// Restablish pnodes; clear all history.
		var subtree_nodes = get_descendant_phynodes(phynode_id);
		for( var sn = 0; sn < subtree_nodes.length; sn++ ){
		    var stn = subtree_nodes[sn];
		    stn.open = true;
		    stn.visible = true;
		    stn.update();
		}
	    }
	}
function dblclick_event_handler ( event ) { var phynode_id = this . id ; // If this is the first double click here... var pn = get_pnode_from_phynode_id ( phynode_id ) ; if ( pn . open == true ) { // "Vanish" edges. var subtree_edges = get_descendant_connections ( phynode_id ) ; for ( var se = 0 ; se < subtree_edges . length ; se ++ ) { var ste = subtree_edges [ se ] ; ste . visible = false ; ste . update ( ) ; } // "Vanish" nodes and text; not this node though... var subtree_nodes = get_descendant_phynodes ( phynode_id ) ; for ( var sn = 0 ; sn < subtree_nodes . length ; sn ++ ) { var stn = subtree_nodes [ sn ] ; if ( stn . id != phynode_id ) { // Turn of visibilty for children. stn . visible = false ; } else { // Mark self as closed. stn . open = false ; } stn . update ( ) ; } } else { //Otherwise... // Reestablish edges. var subtree_edges = get_descendant_connections ( phynode_id ) ; for ( var se = 0 ; se < subtree_edges . length ; se ++ ) { var ste = subtree_edges [ se ] ; ste . visible = true ; ste . update ( ) ; } // Restablish pnodes; clear all history. var subtree_nodes = get_descendant_phynodes ( phynode_id ) ; for ( var sn = 0 ; sn < subtree_nodes . length ; sn ++ ) { var stn = subtree_nodes [ sn ] ; stn . open = true ; stn . visible = true ; stn . update ( ) ; } } }
Experiment with double click.
Experiment with double click .