 
   prepareData: (@days, @commits) ->
     @collectParents()
+    @graphHeight = $(@element).height()
+    @graphWidth = $(@element).width()
+    ch = Math.max(@graphHeight, @offsetY + @unitTime * @mtime + 150)
+    cw = Math.max(@graphWidth, @offsetX + @unitSpace * @mspace + 300)
+    @r = Raphael(@element.get(0), cw, ch)
+    @top = @r.set()
+    @barHeight = Math.max(@graphHeight, @unitTime * @days.length + 320)
 
     for c in @commits
       c.isParent = true  if c.id of @parents
       @preparedCommits[c.id] = c
+      @markCommit(c)
 
     @collectColors()
 

          )
        cumonth = day[1]

    for commit in @commits
      x = @offsetX + @unitSpace * (@mspace - commit.space)
      y = @offsetY + @unitTime * commit.time

      @drawDot(x, y, commit)

      @drawLines(x, y, commit)

      @appendLabel(x, y, commit.refs)  if commit.refs

      @appendAnchor(top, commit, x, y)

      @markCommit(x, y, commit, graphHeight)

    top.toFront()
    @bindEvents()

  bindEvents: ->
    drag = {}

    @offsetY = 20
    @unitTime = 30
    @unitSpace = 10
    @prev_start = -1
    @load()

  load: ->
