     @registerEvents()
 
   setPosition: ->
-
-    position = atom.config.get('atom-ternjs.docsPosition')
-
-    if position is 'force top'
+    if @position is 'force top'
       @documentation.classList.add('top')
       return
 
-    if position is 'force bottom'
+    if @position is 'force bottom'
       @documentation.classList.add('bottom')
       return
 
-    if position is 'force middle'
+    if @position is 'force middle'
       @documentation.classList.add('middle')
       return
 

    @documentation.classList.remove('bottom', 'top', 'middle')

  registerEvents: ->
    @disposables.push atom.config.observe('atom-ternjs.docsPosition', => @removeClasses())

  set: (data) ->
    return unless data.word and data.label

  documentation: null
  disposables: []
  orientation: null
  position: null

  constructor: (state = {}) ->
    @documentation = new DocumentationView()
