mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Fixed bug with heroes not rendering in the hero picker.
This commit is contained in:
parent
8318606457
commit
0306d0ee31
1 changed files with 2 additions and 1 deletions
|
@ -148,7 +148,8 @@ module.exports = class PlayHeroesModal extends ModalView
|
||||||
return hero
|
return hero
|
||||||
fullHero = @getFullHero hero.get 'original'
|
fullHero = @getFullHero hero.get 'original'
|
||||||
onLoaded = =>
|
onLoaded = =>
|
||||||
return unless canvas = $(".hero-item[data-hero-id='#{fullHero.get('original')}'] canvas")
|
canvas = $(".hero-item[data-hero-id='#{fullHero.get('original')}'] canvas")
|
||||||
|
return unless canvas.length # Don't render it if it's not on the screen.
|
||||||
canvas.show().prop width: @canvasWidth, height: @canvasHeight
|
canvas.show().prop width: @canvasWidth, height: @canvasHeight
|
||||||
builder = new SpriteBuilder(fullHero)
|
builder = new SpriteBuilder(fullHero)
|
||||||
movieClip = builder.buildMovieClip(fullHero.get('actions').attack?.animation ? fullHero.get('actions').idle.animation)
|
movieClip = builder.buildMovieClip(fullHero.get('actions').attack?.animation ? fullHero.get('actions').idle.animation)
|
||||||
|
|
Loading…
Reference in a new issue