     @hasWarned        = false
     @preset           = null
     @feedback         = false
+    @xDown            = null
+    @yDown            = null
+    @toAnnotate       = true
     
     @dashboardTutorial = false
     @isTrainingSubject = false

  setupMouseControls: (e) =>
    svg = @svg[0]
    
    # Update/reset Annotation class attributes
    Annotation.halfWidth = @viewer.wfits.width / 2
    Annotation.halfHeight = @viewer.wfits.height / 2

    # Setup mouse controls on the SVG element
    svg.addEventListener('mousewheel', @wheelHandler, false)
    
    # Pass events to viewer if pan key is true
    svg.onmousedown = (e) =>
      
      # Store the down position for later comparison
      @xDown = e.pageX
      @yDown = e.pageY
      
      # TODO: Find more efficient way to do this
      for key, a of @annotations
        return if a.drag
      
      @viewer.wfits.canvas.onmousedown(e)
      
    svg.onmouseup = (e) =>
      
      # Propagate to annotation layer if down coordinates match up coordinates
      if @xDown is e.pageX and @yDown is e.pageY
        @toAnnotate = true
      else
        @toAnnotate = false
      return if @viewer.wfits.drag is false
      
      @viewer.wfits.canvas.onmouseup(e)
      
    svg.onmousemove = (e) =>
      # Pass event to WebFITS object
      @viewer.wfits.canvas.onmousemove(e)
      
      # TODO: Find more efficient way to do this
      for key, a of @annotations
        return if a.drag
      
      if @viewer.wfits.drag
        # Update Annotation class attributes
        Annotation.xOffset = xOffset = @viewer.wfits.xOffset
        Annotation.yOffset = yOffset = @viewer.wfits.yOffset
        
        halfWidth = Annotation.halfWidth
        halfHeight = Annotation.halfHeight
        zoom = Annotation.zoom
        
        # Translate origin
        deltaX = halfWidth + xOffset
        deltaY = halfHeight + yOffset
        
        # Move element within pan-zoom reference frame
        for key, a of @annotations
          x = (a.x + deltaX - halfWidth) * zoom + halfWidth
          y = (a.y - deltaY - halfHeight) * zoom + halfHeight
          
          a.gRoot.setAttribute("transform", "translate(#{x}, #{y})")
          
    svg.onmouseout = (e) =>
      @viewer.wfits.canvas.onmouseout(e)
    svg.onmouseover = (e) =>
      @viewer.wfits.canvas.onmouseover(e)
  
  onViewerClose: (e) =>
    @maskEl.removeClass('show')
    @viewerEl.removeClass('show')
    
    # Allow annotation again
    @toAnnotate = true
    
    # Reset Annotation attributes
    Annotation.xOffset = -220.5
