     selected: null
     mirror: false
     unstyled: false
+    orientation: 'vertical'
 
   componentWillReceiveProps: ->
     @graphData = null

      className: classes

  renderRoute: (commit_idx, [from, to, branch]) ->
    {x_step, y_step} = @props
    offset = @getOffset()
    invert = @getInvert()

    svgPath = new SVGPathData

    from_x = offset + invert + (from + 1) * x_step
    from_y = (commit_idx + 0.5) * y_step
    to_x = offset + invert + (to + 1) * x_step
    to_y = (commit_idx + 0.5 + 1) * y_step

    svgPath.moveTo(from_x, from_y)
    if from_x is to_x
      svgPath.lineTo(to_x, to_y)
    else
      svgPath.bezierCurveTo(
        from_x - x_step / 4, from_y + y_step / 3 * 2,
        to_x + x_step / 4, to_y - y_step / 3 * 2,
        to_x, to_y
      )

    @renderRouteNode(svgPath.toString(), branch)


    @getContentWidth()

  getContentWidth: ->
    if @props.orientation is 'horizontal'
      (@getGraphData().length + 2) * @props.x_step
    else  
      (@getBranchCount() + 0.5) * @props.x_step

  getHeight: ->
    return @props.height if @props.height?
    @getContentHeight()

  getContentHeight: ->
    if @props.orientation is 'horizontal' 
      (@getBranchCount() + 0.5) * @props.y_step
    else 
      (@getGraphData().length + 2) * @props.y_step

  getInvert: ->
    if @props.mirror
