src/js/StaticCanvas.js
function drawLines(node, parent) {
      ctx.save();
      var x = node.offset.x;
      var y = node.offset.y;
      ctx.translate(x, y);

      // branch
      if (parent) {
        drawBranch(node, parent);
      }

      // bottom border
      if (!node.isRoot()) {
        ctx.fillStyle = node.branchColor;
        var tm = node.textMetrics;
        ctx.fillRect(0, tm.height + padding, tm.width, node.lineWidth);
      }

      node.forEachChild(function(child) {
        drawLines(child, node);
      });

      ctx.restore();
    }
function drawLines(node, parent) {
      ctx.save();
      var x = node.offset.x;
      var y = node.offset.y;
      ctx.translate(x, y);

      // branch
      if (parent) {
        drawBranch(node, parent);
      }

      // bottom border
      if (!node.isRoot()) {
        ctx.fillStyle = node.branchColor;
        var tm = node.textMetrics;
        ctx.fillRect(0, tm.height + padding, tm.width, node.lineWidth);
      }

      node.forEachChild(function(child) {
        drawLines(child, node);
      });

      ctx.restore();
    }
function drawLines ( node , parent ) { ctx . save ( ) ; var x = node . offset . x ; var y = node . offset . y ; ctx . translate ( x , y ) ; // branch if ( parent ) { drawBranch ( node , parent ) ; } // bottom border if ( ! node . isRoot ( ) ) { ctx . fillStyle = node . branchColor ; var tm = node . textMetrics ; ctx . fillRect ( 0 , tm . height + padding , tm . width , node . lineWidth ) ; } node . forEachChild ( function ( child ) { drawLines ( child , node ) ; } ) ; ctx . restore ( ) ; }
Draws all branches
Draws all branches