docs: function(json, i) {
        this.json = json;
        //if they're canvas labels erase them.
        if(this.labels && this.labels.clearLabels) {
          this.labels.clearLabels(true);
        }
        this.graph = this.construct(json);
        if($.type(json) != 'array'){
          this.root = json.id;
        } else {
          this.root = json[i? i : 0].id;
        }
      }