 
     #@el.setAttribute 'width', 300
     #@el.style.width = 300
+
+    @manageEvents()
+
+  manageEvents: ->
+    events = {}
+    if @g.config.get "registerMouseClicks"
+      events.click = "_onclick"
+    if @g.config.get "registerMouseHover"
+      events.mousein = "_onmousein"
+      events.mouseout = "_onmouseout"
+    @delegateEvents events
+
+    # listen for changes
+    @listenTo @g.config, "change:registerMouseHover", @manageEvents
+    @listenTo @g.config, "change:registerMouseClick", @manageEvents
 
   draw: ->
     @removeViews()

    @ctx.font="14px Courier New"
    #@ctx.font="14px Lucida Console"

    x = 0
    x = - @g.zoomer.get "_alignmentScrollLeft"
    for j in [0.. seq.length - 1] by 1
      c = seq[j]
      c = c.toUpperCase()
      color = @color[c]

     paddingLeft += @g.zoomer.get "metaWidth" if @g.vis.get "metacell"
     return paddingLeft

  # TODO: should I be moved to the selection manager?
  # returns an array with the currently selected residues
  # e.g. [0,3] = pos 0 and 3 are selected
  _getSelection: (model) ->
    maxLen = model.get("seq").length
    selection = []
    sels = @g.selcol.getSelForRow model.get "id"
    rows = _.find sels, (el) -> el.get("type") is "row"
    if rows?
      # full match
      for n in [0..maxLen - 1] by 1
        selection.push n
    else if sels.length > 0
      for sel in sels
        for n in [sel.get("xStart")..sel.get("xEnd")] by 1
          selection.push n

    return selection


  _adjustWidth: ->
    if @el.parentNode?
      parentWidth = @el.parentNode.offsetWidth
