mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Fix for #272 bug.
This commit is contained in:
parent
8276dbf2d1
commit
5216432bf9
3 changed files with 16 additions and 4 deletions
app
styles/editor/level
templates/editor/level
views/editor/level
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue