   attachToPaneView: ->
     @paneView.addClass('with-minimap')
     @paneView.append(this)
+    @adjustTopPosition()
 
   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) =>
      @offset top: (@offsetTop = @editorView.offset().top)

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

    computedLineHeight = @getLineHeight()

    @scaleX = @scaleY = computedLineHeight / originalLineHeight

  adjustTopPosition: ->
    @offset top: (@offsetTop = @editorView.offset().top)

  setDisplayCodeHighlights: (value) ->
    if value isnt @displayCodeHighlights
