 Delegato = require 'delegato'
 DecorationManagement = require './mixins/decoration-management'
 
-# Public:
+# Public: The {MinimapRenderView} class is responsible to render the minimap
+# onto its canvas.
 module.exports =
 class MinimapRenderView extends ScrollView
   Emitter.includeInto(this)
   Delegato.includeInto(this)
   DecorationManagement.includeInto(this)
 
-  ### Public ###
 
   @delegatesMethods 'getMarker', 'findMarkers', toProperty: 'editor'
 

    screenRow = 0 if isNaN(screenRow)
    screenRow

  getDefaultColor: ->
    @transparentize(@minimapView.editorView.css('color'), @getTextOpacity())

  ensureDummyNodeExistence: ->
    unless @dummyNode?
      @dummyNode = document.createElement('span')
      @dummyNode.style.visibility = 'hidden'
      @editorView.append(@dummyNode)

  # This function insert a dummy token element in the DOM to compute its style,
  # return the specified property, and remove the element from the DOM.

    atom.config.observe 'minimap.charHeight', (@charHeight) => @forceUpdate()
    atom.config.observe 'minimap.textOpacity', (@textOpacity) => @forceUpdate()

  # Destroys the {MinimapRenderView} instance, unsubscribes from the listened
  # events and releases its resources.
  destroy: ->
    @unsubscribe()
    @subscriptions.dispose()
    @editorView = null

  # Sets the `EditorView` for which the {MinimapRenderView} instance
  # is displayed.
  #
  # editorView - The `EditorView` instance.
  setEditorView: (@editorView) ->
    @editor = @editorView.getModel()
    @buffer = @editorView.getEditor().getBuffer()
