       pos ?= x: Math.round(@world.width / 2), y: Math.round(@world.height / 2)
       @adjustThangPos @addThangSprite, thang, pos
     else
-      @surface.camera.unlock()
       @addThangSprite = null
 
   createEssentialComponents: ->


  onStageMouseUp: (e) ->
    if @addThangSprite
      # If we click on the background, we need to add @addThangSprite, but not if onSpriteMouseUp will fire.
      @backgroundAddClickTimeout = _.defer => @onExtantThangSelected {}
    $('#contextmenu').hide()


  onSpriteMouseUp: (e) ->
    clearTimeout @backgroundAddClickTimeout
    @surface.camera.unlock()
    if e.originalEvent.nativeEvent.button == 2 and @selectedExtantThang
      @onSpriteContextMenu e
    clearInterval(@movementInterval) if @movementInterval?
