 
   attributeChangedCallback: (attrName, oldValue, newValue) ->
 
+  #       ###    ######## ########    ###     ######  ##     ##
+  #      ## ##      ##       ##      ## ##   ##    ## ##     ##
+  #     ##   ##     ##       ##     ##   ##  ##       ##     ##
+  #    ##     ##    ##       ##    ##     ## ##       #########
+  #    #########    ##       ##    ######### ##       ##     ##
+  #    ##     ##    ##       ##    ##     ## ##    ## ##     ##
+  #    ##     ##    ##       ##    ##     ##  ######  ##     ##
+
+  isVisible: -> @offsetWidth > 0 or @offsetHeight > 0
+
   attach: ->
     return if @attached
     @swapMinimapPosition()
 
+  attachToLeft: ->
+    root = @getTextEditorElementRoot()
+    root.insertBefore(this, root.children[0])
+
+  attachToRight: ->
+    @getTextEditorElementRoot().appendChild(this)
+
   swapMinimapPosition: ->
     if @displayMinimapOnLeft
       @attachToLeft()
     else
       @attachToRight()
-
-  attachToLeft: ->
-    root = @getTextEditorElementRoot()
-    root.insertBefore(this, root.children[0])
-
-  attachToRight: ->
-    @getTextEditorElementRoot().appendChild(this)
 
   detach: ->
     return unless @attached

      'minimap.useHardwareAcceleration': (@useHardwareAcceleration) =>
        @requestUpdate() if @attached

  observeConfig: (configs={}) ->
    for config, callback of configs
      @subscriptions.add atom.config.observe config, callback

  attachedCallback: ->
    @domPollingIntervalId = setInterval((=> @pollDOM()), @domPollingInterval)
    @measureHeightAndWidth()


    @minimap

  #    ##     ## ########  ########     ###    ######## ########
  #    ##     ## ##     ## ##     ##   ## ##      ##    ##
  #    ##     ## ##     ## ##     ##  ##   ##     ##    ##
  #    ##     ## ########  ##     ## ##     ##    ##    ######
  #    ##     ## ##        ##     ## #########    ##    ##
  #    ##     ## ##        ##     ## ##     ##    ##    ##
  #     #######  ##        ########  ##     ##    ##    ########

  requestUpdate: ->
    return if @frameRequested
