MCPcopy Create free account
hub / github.com/codecombat/codecombat / buildValueForDisplay

Method buildValueForDisplay

app/views/editor/level/treema_nodes.js:541–549  ·  view source on GitHub ↗
(valEl, data)

Source from the content-addressed store, hash-verified

539
540module.exports.StateNode = (StateNode = (SateNode = class SateNode extends TreemaNode.nodeMap.string {
541 buildValueForDisplay (valEl, data) {
542 let state
543 super.buildValueForDisplay(valEl, data)
544 if (!data) { return }
545 if (!(state = utils.usStateCodes.getStateNameByStateCode(this.data))) { return console.error(`Couldn't find state ${this.data}`) }
546
547 const stateElement = () => $(`<span> - <i>${state}</i></span>`)
548 return valEl.find('.treema-shortened').append(stateElement())
549 }
550}))
551
552module.exports.PromptTypeNode = class PromptTypeNode extends TreemaNode.nodeMap.string {

Callers

nothing calls this directly

Calls 2

buildValueForDisplayMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected