     # Draw the chain and the root, connect them.
     node = root
     for i in [0..decision.chainCount]
-      @drawNode(left, top + i * @nodeDistance, node.id)
+      @addNode(left, top + i * @nodeDistance, node.id)
       node = node.children[0]
       if i != 0
         @drawEdge(left, top + (i - 1) * @nodeDistance, left, top + i * @nodeDistance)


    @ctx.arc(x, y, radius, 0, 2 * Math.PI)
    @ctx.fill()

    # put it in nodeList
    @nodeList.push({x : x, y : y, id : id})


  drawEdge : (x1, y1, x2, y2) ->

    @recordWidths(root)
    @drawTreeWithWidths(root, @NODE_RADIUS, @canvas.width() - @NODE_RADIUS, @nodeDistance, mode)

    # because of z layering all nodes have to be drawn last
    @drawAllNodes()


  drawTreeWithWidths : (tree, left, right, top, mode) ->

