 ]).
 
 #
-# @param {Boolean} keyboard Allow closing modal with keyboard (default false)
-# @param {Boolean} overlay-close Allow closing modal when clicking on overlay (default false)
-# @param {Boolean} resize Allow modal to resize on window resize event (default true)
-# @param {Function} open Callback when the modal is opened
+# @chalk overview
+# @name mac-modal (element)
+# @description
+# Element directive to define the modal dialog. Modal content is transcluded into a
+# modal template
+#
+# @param {Boolean}  keyboard      Allow closing modal with keyboard (default false)
+# @param {Boolean}  overlay-close Allow closing modal when clicking on overlay (default false)
+# @param {Boolean}  resize        Allow modal to resize on window resize event (default true)
+# @param {Function} open          Callback when the modal is opened
+# @param {Integer}  topOffset     Top offset when the modal is larger than window height (default 20)
 #
 directive("macModal", [
   "$rootScope"

      if @waiting? and @waiting.id is id
        @show id, @waiting.options

    unregister: (id) ->
      unless @registered[id]?
        throw new Error "Modal #{id} is not registered"

    # Current opened modal
    opened: null

    #
    # @name show
    # @description
    # Show a modal based on the modal id
    # @param {String} id The id of the modal to open
    # @param {Object} triggerOptions Additional options to open modal
    #
    show: (id, triggerOptions = {}) ->
      if @registered[id]?
        {element, options} = @registered[id]
