       </div>
     """
 
-  addSubView:(view, selector = ".kdmodal-content", shouldPrepend = no)->
+
+  addSubView: (view, selector = ".kdmodal-content", shouldPrepend = no) ->
     selector = null if @$(selector).length is 0
     super view, selector, shouldPrepend
 
-  setButtons:(buttonDataSet, destroyExists = no)->
+
+  setButtons: (buttonDataSet, destroyExists = no) ->
     @buttons or= {}
     @setClass "with-buttons"
     defaultFocusTitle = null


  ### STACK HELPERS ###

  @createStack: (options)->
    @stack or= new KDModalViewStack options

  @addToStack: (modal)->
    @stack.addModal modal

  @destroyStack: ->
    @stack.destroy()
    delete @stack

  @confirm = (options)->
    noop = -> modal.destroy()

    { ok, cancel, title, content, description } = options

      @$().height value
      @modalHeight = value


  setModalWidth: (value) ->
    # if isNaN value
    @modalWidth = value
    @$().width value


  setPositions: ->
    @utils.defer =>
      {top, right, bottom, left} = @getOptions().position
      newRules = {}
