   #           offsetTop - The {MinimapElement} offset at the moment of the
   #                       drag start.
   endDrag: (e, initial) ->
+    return if @minimap.isDestroyed()
     @dragSubscription.dispose()
 
   #     ######   ######   ######

  #           offsetTop - The {MinimapElement} offset at the moment of the
  #                       drag start.
  drag: (e, initial) ->
    return if e.which isnt 1 and e.which isnt 2
    y = e.pageY - initial.offsetTop - initial.dragOffset


  startDrag: ({which, pageY}) ->
    # if which is 2
    #   @middleMousePressedOverCanvas({pageY})
    return if @minimap.isDestroyed()
    return if which isnt 1 and which isnt 2
    {top} = @visibleArea.getBoundingClientRect()
    {top: offsetTop} = @getBoundingClientRect()
