A couple achievment/item editor error fixes.

This commit is contained in:
Nick Winter 2014-08-29 13:00:11 -07:00
parent 434a0c071b
commit 68dcdaf223
2 changed files with 5 additions and 2 deletions

View file

@ -41,6 +41,7 @@ module.exports = class AchievementEditView extends RootView
change: @pushChangesToPreview
@treema = @$el.find('#achievement-treema').treema(options)
@treema.build()
@pushChangesToPreview()
getRenderData: (context={}) ->
context = super(context)
@ -54,6 +55,7 @@ module.exports = class AchievementEditView extends RootView
@pushChangesToPreview()
pushChangesToPreview: =>
return unless @treema
@$el.find('#achievement-view').empty()
for key, value of @treema.data
@achievement.set key, value

View file

@ -14,7 +14,7 @@ module.exports = class ThangTypeColorsTabView extends CocoView
super options
@supermodel.loadModel @thangType, 'thang'
@colorConfig = {hue: 0, saturation: 0.5, lightness: 0.5}
@spriteBuilder = new SpriteBuilder(@thangType)
@spriteBuilder = new SpriteBuilder(@thangType) if @thangType.get('raw')
f = =>
@offset++
@updateMovieClip()
@ -54,7 +54,7 @@ module.exports = class ThangTypeColorsTabView extends CocoView
@updateMovieClip()
updateMovieClip: ->
return unless @currentColorGroupTreema
return unless @currentColorGroupTreema and @thangType.get('raw')
actionDict = @thangType.getActions()
animations = (a.animation for key, a of actionDict when a.animation)
index = @offset % animations.length
@ -74,6 +74,7 @@ module.exports = class ThangTypeColorsTabView extends CocoView
@stage.addChild @movieClip
updateContainer: ->
return unless @thangType.get('raw')
actionDict = @thangType.getActions()
idle = actionDict.idle
@stage.removeChild(@container) if @container