 module.exports = class SpellTranslationView extends CocoView
   className: 'spell-translation-view'
   template: template
-  
+
   events:
     'mousemove': ->
       @$el.hide()

      @markerRange = new Range pos.row, start, pos.row, end
      @reposition(e.domEvent)
    @update()
    
  reposition: (e) ->
    offsetX = e.offsetX ? e.clientX - $(e.target).offset().left
    offsetY = e.offsetY ? e.clientY - $(e.target).offset().top

  setTooltipText: (text) =>
    @$el.find('code').text text
    @$el.show().css(@pos)

  isIdentifier: (t) ->
    t and (_.any([/identifier/, /keyword/], (regex) -> regex.test(t.type)) or t.value is 'this')

  onMouseMove: (e) =>
    return if @destroyed
    pos = e.getDocumentPosition()
