code: function(node, canvas) {
       var config = this.config;
       var level = config.levelsToShow;
       var constrained = config.constrained;
       if(!constrained) return level;
       while(!this.treeFitsInCanvas(node, canvas, level) && level > 1) { level-- ; }
       return level;
    }
docs: /*
  Returns the right level to show for the current tree in order to fit in canvas.