             .attr('y', (node) -> - node.height / 2)
             .attr('width', (node) -> node.width)
             .attr('height', (node) -> node.height)
+
+        svg.selectAll('.cell text')
+            .attr('y', (node) -> pad.top - node.height / 2 - 5)
 
         link.attr('x1', (d) -> d.source.x)
             .attr('y1', (d) -> d.source.y)

    force.on 'tick', ->
        for node in nodes
            if node.children.length > 0
                xMin = d3.min(node.children, (d) -> d.x - d.width / 2) - 5
                xMax = d3.max(node.children, (d) -> d.x + d.width / 2) + 5
                yMin = d3.min(node.children, (d) -> d.y - d.height / 2) - 5
                yMax = d3.max(node.children, (d) -> d.y + d.height / 2) + 5
                node.width = xMax - xMin
                node.height = yMax - yMin
                dx = xMin + node.width / 2 - node.x

pad = {
    top: 20
    bottom: 5
    left: 5
    right: 5
}


walk = (state, callback, parent=null) ->
    callback(state, parent)
    for child in state.children or []
