mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Fixed #408.
This commit is contained in:
parent
953c9064f5
commit
21975bedd2
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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: ->
|
||||
|
|
Loading…
Reference in a new issue