diff --git a/app/styles/editor/level/thangs_tab.sass b/app/styles/editor/level/thangs_tab.sass index e643303bd..183d1cde6 100644 --- a/app/styles/editor/level/thangs_tab.sass +++ b/app/styles/editor/level/thangs_tab.sass @@ -75,13 +75,14 @@ right: 0 top: 0 bottom: 0 - + #thangs-list - position: absolute + position: relative right: 0 - top: 40px + top: 0 bottom: 0 overflow: scroll + height: 100% h3 margin: 0 -20px 0 0 diff --git a/app/templates/editor/level/thangs_tab.jade b/app/templates/editor/level/thangs_tab.jade index 72ff26b02..cb2bfadb8 100644 --- a/app/templates/editor/level/thangs_tab.jade +++ b/app/templates/editor/level/thangs_tab.jade @@ -22,7 +22,8 @@ #canvas-top-gradient.gradient .add-thangs-palette.thangs-column - h3(data-i18n="editor.level_tab_thangs_add") Add Thangs + #thangs-header + h3(data-i18n="editor.level_tab_thangs_add") Add Thangs #thangs-list for group in groups h4= group.name diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index b948b6107..f5963e65b 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -90,12 +90,19 @@ module.exports = class ThangsTabView extends View context.groups = groups context + onWindowResize: (e) -> + $('#thangs-list').height('100%') + thangsHeaderHeight = $('#thangs-header').height() + oldHeight = $('#thangs-list').height() + $('#thangs-list').height(oldHeight - thangsHeaderHeight) + afterRender: -> return if @startsLoading super() $('.tab-content').click @selectAddThang $('#thangs-list').bind 'mousewheel', @preventBodyScrollingInThangList @$el.find('#extant-thangs-filter button:first').button('toggle') + $(window).resize @onWindowResize onFilterExtantThangs: (e) -> @$el.find('#extant-thangs-filter button.active').button('toggle') @@ -131,6 +138,9 @@ module.exports = class ThangsTabView extends View @thangsTreema.open() @onThangsChanged() # Initialize the World with Thangs @initSurface() + thangsHeaderHeight = $('#thangs-header').height() + oldHeight = $('#thangs-list').height() + $('#thangs-list').height(oldHeight - thangsHeaderHeight) initSurface: -> surfaceCanvas = $('canvas#surface', @$el)