             @headerContainer.innerHtml = ""
 
         @w = @container.offsetWidth
-        @h = @container.offsetHeight - @layout.columnHeaderHeight
+        @h = @container.offsetHeight - @layout.header_height
 
         @last_i = 0
         @last_j = 0

        el.innerText = data
        el.style.left = @col_offset[j] + "px"
        el.style.top = @layout.row_height * i + "px"
        el.style.width = @layout.column_width[j] - 1 + "px"
        el.style.height = @layout.row_height - 1 + "px"
        @viewport.appendChild el
        @cells[","+ (i + j * @nb_rows) ] = el

    cs

class TableData
    # TODO make it asynchronous
    constructor: (@_nb_rows, @_nb_cols)->
    get: (i,j)->
        i + "," + j
    header: (i)->
        "col " + i
    nb_cols: ->
        @_nb_cols
    nb_rows: ->
        @_nb_rows

scroll_options =
    mouseWheel: true
