mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-03 17:33:31 -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
|
right: 0
|
||||||
top: 0
|
top: 0
|
||||||
bottom: 0
|
bottom: 0
|
||||||
|
|
||||||
#thangs-list
|
#thangs-list
|
||||||
position: absolute
|
position: relative
|
||||||
right: 0
|
right: 0
|
||||||
top: 40px
|
top: 0
|
||||||
bottom: 0
|
bottom: 0
|
||||||
overflow: scroll
|
overflow: scroll
|
||||||
|
height: 100%
|
||||||
|
|
||||||
h3
|
h3
|
||||||
margin: 0 -20px 0 0
|
margin: 0 -20px 0 0
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
#canvas-top-gradient.gradient
|
#canvas-top-gradient.gradient
|
||||||
|
|
||||||
.add-thangs-palette.thangs-column
|
.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
|
#thangs-list
|
||||||
for group in groups
|
for group in groups
|
||||||
h4= group.name
|
h4= group.name
|
||||||
|
|
|
@ -90,12 +90,19 @@ module.exports = class ThangsTabView extends View
|
||||||
context.groups = groups
|
context.groups = groups
|
||||||
context
|
context
|
||||||
|
|
||||||
|
onWindowResize: (e) ->
|
||||||
|
$('#thangs-list').height('100%')
|
||||||
|
thangsHeaderHeight = $('#thangs-header').height()
|
||||||
|
oldHeight = $('#thangs-list').height()
|
||||||
|
$('#thangs-list').height(oldHeight - thangsHeaderHeight)
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
return if @startsLoading
|
return if @startsLoading
|
||||||
super()
|
super()
|
||||||
$('.tab-content').click @selectAddThang
|
$('.tab-content').click @selectAddThang
|
||||||
$('#thangs-list').bind 'mousewheel', @preventBodyScrollingInThangList
|
$('#thangs-list').bind 'mousewheel', @preventBodyScrollingInThangList
|
||||||
@$el.find('#extant-thangs-filter button:first').button('toggle')
|
@$el.find('#extant-thangs-filter button:first').button('toggle')
|
||||||
|
$(window).resize @onWindowResize
|
||||||
|
|
||||||
onFilterExtantThangs: (e) ->
|
onFilterExtantThangs: (e) ->
|
||||||
@$el.find('#extant-thangs-filter button.active').button('toggle')
|
@$el.find('#extant-thangs-filter button.active').button('toggle')
|
||||||
|
@ -131,6 +138,9 @@ module.exports = class ThangsTabView extends View
|
||||||
@thangsTreema.open()
|
@thangsTreema.open()
|
||||||
@onThangsChanged() # Initialize the World with Thangs
|
@onThangsChanged() # Initialize the World with Thangs
|
||||||
@initSurface()
|
@initSurface()
|
||||||
|
thangsHeaderHeight = $('#thangs-header').height()
|
||||||
|
oldHeight = $('#thangs-list').height()
|
||||||
|
$('#thangs-list').height(oldHeight - thangsHeaderHeight)
|
||||||
|
|
||||||
initSurface: ->
|
initSurface: ->
|
||||||
surfaceCanvas = $('canvas#surface', @$el)
|
surfaceCanvas = $('canvas#surface', @$el)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue