lib/js/TreeView.js
function() {
      var t = this,
          branches = t.model.get('branches'),
          leaves = t.model.get('leaves'),
          hash = "";

      // The hash is the text of the branches & leaves
      branches && branches.forEach(function(node) {
        var label = node.get('label') || node.id,
            description = node.get('description');
        hash += '|' + label;
        if (description) {
          hash += '|' + description;
        }
      });

      // The hash is the text of the branches & leaves
      leaves && leaves.forEach(function(node) {
        var label = node.get('label') || node.id,
            description = node.get('description');
        hash += '|' + label;
        if (description) {
          hash += '|' + description;
        }
      });

      // Return the hash
      return hash;
    }
function() {
      var t = this,
          branches = t.model.get('branches'),
          leaves = t.model.get('leaves'),
          hash = "";

      // The hash is the text of the branches & leaves
      branches && branches.forEach(function(node) {
        var label = node.get('label') || node.id,
            description = node.get('description');
        hash += '|' + label;
        if (description) {
          hash += '|' + description;
        }
      });

      // The hash is the text of the branches & leaves
      leaves && leaves.forEach(function(node) {
        var label = node.get('label') || node.id,
            description = node.get('description');
        hash += '|' + label;
        if (description) {
          hash += '|' + description;
        }
      });

      // Return the hash
      return hash;
    }
function ( ) { var t = this , branches = t . model . get ( 'branches' ) , leaves = t . model . get ( 'leaves' ) , hash = "" ; // The hash is the text of the branches & leaves branches && branches . forEach ( function ( node ) { var label = node . get ( 'label' ) || node . id , description = node . get ( 'description' ) ; hash += '|' + label ; if ( description ) { hash += '|' + description ; } } ) ; // The hash is the text of the branches & leaves leaves && leaves . forEach ( function ( node ) { var label = node . get ( 'label' ) || node . id , description = node . get ( 'description' ) ; hash += '|' + label ; if ( description ) { hash += '|' + description ; } } ) ; // Return the hash return hash ; }
Return a hash code representing the visual state of the underlying data model.  This is compared with subsequent states to prevent too much re-rendering.
Return a hash code representing the visual state of the underlying data model . This is compared with subsequent states to prevent too much re - rendering .