 module.exports =
 class JumpyView extends View
   @content: ->
-    @div '', class: 'jumpy label'
+    @div ''
 
   initialize: (serializeState) ->
     @pixels = @getAllPixelLocations()

      nearestCursor =
          left: nearestMultiple(labelLocation.left, cursor.clientWidth)
          top: nearestMultiple(labelLocation.bottom - labelLocation.height, cursor.clientHeight)
      console.log nearestCursor.left, nearestCursor.top

      lines = atom.workspaceView.find('.lines')
      offsetTop = lines.get(0).offsetTop
      #offsetLeft = lines.get(0).offsetLeft
      offsetLeft = 0 # TODO: this needs to be replace with scroll to the right info.
      scrollViewOffset = $('.editor .scroll-view').offset()
      for line, lineIndex in @pixels
          line = _.compact line
          for char, charIndex in line
              #console.log lineIndex, charIndex, char
              isAtLeft = (nearestCursor.left ==
                  char.left + scrollViewOffset.left + offsetLeft)
              isAtTop = (nearestCursor.top ==
                  char.top + scrollViewOffset.top + offsetTop)
              if isAtLeft && isAtTop
                  return [lineIndex, charIndex]



  # Tear down any state and detach
  destroy: ->
    console.log 'Jumpy: "destroy" called. Detaching.'
    @clearJumpMode()
    @detach()

  toggle: ->
    $('#status-bar-jumpy').html("Jumpy: Jump Mode!")
    atom.workspaceView.eachEditorView (e) -> e.addClass 'jumpy-specificity-1 jumpy-specificity-2 jumpy-jump-mode'

    relevantClasses = ['variable', 'keyword', 'method', 'string.quoted']
    atom.workspaceView.find((".line .source .#{c}" for c in relevantClasses).join()).prepend('<div class="jumpy label"></div>')

    nextKeys = _.clone keys

