   # HTML object where the mouse attaches the events
   ###
   constructor : (target, activeCallback) ->
-    # @User = User
     @target = target
 
     @activeCallback = activeCallback

      "mouseup"   : @mouseUp

    $(@target).on 
      "mouseup"   : @mouseUp
      "mousedown" : @mouseDown
      "mouseenter" : @mouseEnter
      "mousewheel" : @mouseWheel

      @changedCallbackY distY * User.Configuration.mouseRotateValue if distY isnt 0

  mouseEnter : (evt) =>
    # don't invoke activeCallback, when leftclicking while entering
    if evt.which != 1 and @activeCallback?
      @activeCallback()

  mouseWheel : (evt, delta) =>
    if @changedCallbackMouseWheel?
      @changedCallbackMouseWheel(delta)
      return false      # prevent scrolling the web page
    
  mouseDown : (evt) =>
    # check whether the mouseDown event is a rightclick
    if evt.which == 3
      # on rightclick, return mouse position relative to the canvas
      @changedCallbackRightclick [evt.pageX - $(@target).offset().left, evt.pageY - $(@target).offset().top], 0
    else
      if @activeCallback?
        @activeCallback()
