     computedLineHeight = @getLineHeight()
 
     @scaleX = @scaleY = computedLineHeight / originalLineHeight
+
+  adjustTopPosition: ->
+    @offset top: (@offsetTop = @editorView.offset().top)
 
   setDisplayCodeHighlights: (value) ->
     if value isnt @displayCodeHighlights

  attachToPaneView: ->
    @paneView.addClass('with-minimap')
    @paneView.append(this)

  detachFromPaneView: ->
    @paneView.removeClass('with-minimap')

    # The mutation observer is required so that we can relocate the minimap
    # everytime the children of the pane changes.
    @observer = new MutationObserver (mutations) =>
      @adjustTopPosition()

    config = childList: true
    @observer.observe @paneView.element, config
