      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

TaylorColors = require "./color/taylor"
ZappoColors = require "./color/zappo"
HydroColors = require "./color/hydrophobicity"

module.exports = pluginator.extend


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

    x = - @g.zoomer.get "_alignmentScrollLeft"
    # skip unneeded blocks at the beginning
    start = Math.max 0, - Math.ceil(x / rectWidth)
    x = 0

    selection = @_getSelection data.model
    console.log selection

    for j in [start.. seq.length - 1] by 1
      c = seq[j]
      c = c.toUpperCase()
      color = @color[c]
