This commit is contained in:
Nick Winter 2014-02-24 11:21:51 -08:00
parent 953c9064f5
commit 21975bedd2
2 changed files with 5 additions and 2 deletions

View file

@ -101,7 +101,7 @@ module.exports = class DebugView extends View
return "<this #{value.id}>" if value is @thang and depth
if depth is 2
if value.constructor?.className is "Thang"
value = "<#{value.spriteName} - #{value.id}, #{if value.pos then value.pos.toString() else 'non-physical'}>"
value = "<#{value.type or value.spriteName} - #{value.id}, #{if value.pos then value.pos.toString() else 'non-physical'}>"
else
value = value.toString()
return value

View file

@ -74,7 +74,7 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
formatPopover: (doc) ->
content = popoverTemplate doc: doc, marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in doc.args ? [])
owner = @thang
content = content.replace /#{spriteName}/g, @thang.spriteName # No quotes like we'd get with @formatValue
content = content.replace /#{spriteName}/g, @thang.type ? @thang.spriteName # Prefer type, and excluded the quotes we'd get with @formatValue
content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
formatValue: (v) ->
@ -101,12 +101,15 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
onClick: (e) -> # Don't call super
onDropdownClick: (e) ->
return unless @controlsEnabled
Backbone.Mediator.publish 'tome:toggle-spell-list'
onCodeReload: ->
return unless @controlsEnabled
Backbone.Mediator.publish "tome:reload-code", spell: @spell
onBeautifyClick: ->
return unless @controlsEnabled
Backbone.Mediator.publish "spell-beautify", spell: @spell
updateReloadButton: ->