         paths.push(new fabric.Line coords, @constant.path_style)
     paths
 
+  focus: (layer,pos)->
+    @div.scrollTo {
+      left : -200 + @constant.padding_left + pos * @constant.outer_width
+      top  : -200 + @constant.padding_top  + layer * @constant.outer_height
+    }
+
   destroy: (sha1)->
     # TODO remove sha1's related fabric objects
 

    @canvas = canvas

  canvas_inc_width: ()->
    console.log 'inc width'
    @canvas.setWidth  @canvas_width *= 1.2
  canvas_inc_height: ()->
    console.log 'inc height'
    @canvas.setHeight @canvas_height *= 1.2
  freeze: (fabric_obj)->
    attrs = [
      'lockMovementX'

    setTimeout( @draw.bind(@,sha1,layer,pos),0 )

  # TODO
  # ref_on_commit: (ref)
  # ref_on_ref:    (ref1, ref2)
  add_commit: (commit)->
