   setLayout: ->
     @layout = @body.layout
       livePaneResizing: true
+      onresize: =>
+        @setSizes()
       west:
         size: '20%'
         slidable: false

    @selectedObject = ko.observable null

    @tabs = ko.observableArray []
    @tabs.subscribe @setSizes

    @selectedTab = ko.observable null

    @attachListeners()
    @setLayout()
    @setSizes()

    element = $('.editor')[0]
    @editor = ace.edit element
    @editor.setTheme 'ace/theme/clouds'
    $(element).css fontSize: '12pt', fontFamily: '"Source Code Pro", sans-serif'

    ko.applyBindings @


            slidable: false

  setSizes: ->
    editor = $ '.editor'
    frame = editor.parent()
    tabs = $ '.tabs'
    toolbar = $ '.toolbar'
    console.log frame.innerHeight()
    editor.width frame.innerWidth()
    editor.height frame.innerHeight() - tabs.outerHeight() - toolbar.outerHeight()
    console.log @editor
    @editor.resize()

  loadSidebar: ->
    @socket.emit 'get_tree', null, (tree) =>
