Fixed bug with heroes not rendering in the hero picker.

This commit is contained in:
Nick Winter 2014-12-04 15:04:34 -08:00
parent 8318606457
commit 0306d0ee31

View file

@ -148,7 +148,8 @@ module.exports = class PlayHeroesModal extends ModalView
return hero
fullHero = @getFullHero hero.get 'original'
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
builder = new SpriteBuilder(fullHero)
movieClip = builder.buildMovieClip(fullHero.get('actions').attack?.animation ? fullHero.get('actions').idle.animation)