     # Decision points will definitely be drawn.
 
     chainCount = 0
+    hasActiveNode = false
 
     # skip comment check on first node
     if tree.children.length == 1

      chainCount,
      isBranch: tree.children.length > 1
      isLeaf: tree.children.length == 0
      isComment: @nodeIdHasComment(tree.id)
    }


  chainContainsActiveNode : (root, decisionNode) ->

      # Find out, if the chain contains an active node
      node = root.children[0]
      hasActiveNode = false

      while node.id != decisionNode.id
        if node.id == @activeNodeId
          return true
        node = node.children[0]

      return false


  recordWidths : (tree) ->


  drawChainWithChainIndicatorFromTo : (top, middle, tree, decision) ->

    # Draw root, chain indicator and decision point
    @addNode(middle, top, tree.id)
    @drawEdge(middle, top, middle, top + 0.5 * @nodeDistance)
    @drawChainIndicator(middle, top + 0.5 * @nodeDistance, top + 1.5 * @nodeDistance, decision.hasActiveNode)
    @drawEdge(middle, top + 1.5 * @nodeDistance, middle, top + 2 * @nodeDistance)
    @addNode(middle, top + 2 * @nodeDistance, decision.node.id)

