       @g.zoomer.set "alignmentWidth", @maxWidth
     @el.style.width = Math.min calcWidth, @maxWidth
     @el.setAttribute 'width', @el.style.width
+
+  _getPrevNextSelection: (model) ->
+    # looks at the selection of the prev and next el
+    # TODO: this is very naive, as there might be gaps above or below
+
+    modelPrev = model.collection.prev model
+    modelNext = model.collection.next model
+    mPrevSel = @_getSelection modelPrev if modelPrev?
+    mNextSel = @_getSelection modelNext if modelNext?
+    [mPrevSel,mNextSel]
+
+

        @ctx.fillRect x,y,rectWidth,rectHeight
        @ctx.strokeText c,x + 3,y + 12,rectWidth

      # check for selection
      if selection.indexOf(j) >= 0
        @ctx.lineWidth = 2
        @ctx.fillStyle = "red"
        @ctx.strokeRect x,y,rectWidth,rectHeight
        @ctx.lineWidth = 1

      x = x + rectWidth

      # out of viewport - stop
      if x > @el.width
        break

  _onclick: (e) ->
    coords = mouse.getMouseCoords e

    for i in [0.. @model.length - 1] by 1
      continue if @model.at(i).get('hidden')
      @drawSeq {model: @model.at(i), y: y}
      y = y + rectHeight
      # out of viewport - stop
      if y > @el.height
        break

    y = - @g.zoomer.get "_alignmentScrollTop"
    # draw again - overlays
    for i in [0.. @model.length - 1] by 1
      continue if @model.at(i).get('hidden')
      @drawSeqExtended {model: @model.at(i), y: y}
      y = y + rectHeight
      # out of viewport - stop
      if y > @el.height
        break
