mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -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
|
return "<this #{value.id}>" if value is @thang and depth
|
||||||
if depth is 2
|
if depth is 2
|
||||||
if value.constructor?.className is "Thang"
|
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
|
else
|
||||||
value = value.toString()
|
value = value.toString()
|
||||||
return value
|
return value
|
||||||
|
|
|
@ -74,7 +74,7 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
|
||||||
formatPopover: (doc) ->
|
formatPopover: (doc) ->
|
||||||
content = popoverTemplate doc: doc, marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in doc.args ? [])
|
content = popoverTemplate doc: doc, marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in doc.args ? [])
|
||||||
owner = @thang
|
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('.'))
|
content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
|
||||||
|
|
||||||
formatValue: (v) ->
|
formatValue: (v) ->
|
||||||
|
@ -101,12 +101,15 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
|
||||||
onClick: (e) -> # Don't call super
|
onClick: (e) -> # Don't call super
|
||||||
|
|
||||||
onDropdownClick: (e) ->
|
onDropdownClick: (e) ->
|
||||||
|
return unless @controlsEnabled
|
||||||
Backbone.Mediator.publish 'tome:toggle-spell-list'
|
Backbone.Mediator.publish 'tome:toggle-spell-list'
|
||||||
|
|
||||||
onCodeReload: ->
|
onCodeReload: ->
|
||||||
|
return unless @controlsEnabled
|
||||||
Backbone.Mediator.publish "tome:reload-code", spell: @spell
|
Backbone.Mediator.publish "tome:reload-code", spell: @spell
|
||||||
|
|
||||||
onBeautifyClick: ->
|
onBeautifyClick: ->
|
||||||
|
return unless @controlsEnabled
|
||||||
Backbone.Mediator.publish "spell-beautify", spell: @spell
|
Backbone.Mediator.publish "spell-beautify", spell: @spell
|
||||||
|
|
||||||
updateReloadButton: ->
|
updateReloadButton: ->
|
||||||
|
|
Loading…
Reference in a new issue