 
     scrollToTop: ->
         return if @suppressExpansion
-        
+
         @$el.addClass 'expanded'
-        utils.animatedExpansion @$el
+        utils.animatedExpansion @$el, @shrink
 
     navigate: (event) ->
         event.preventDefault()

        if tableHeight?
            $loaderContainer.css 'height', "#{ tableHeight }px"

    shrink: ->
        @$el.removeClass 'expanded'
        @$el.trigger 'shrink'
        @suppressExpansion = true

module.exports = FileBrowserSubview


    events: ->
        'click [data-directory-path]':  'navigate'
        'click [data-action="shrink"]': 'startShrink'

    initialize: ({ @scrollWhenReady }) ->
        @listenTo @collection, 'sync',  @render
