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

Method constructor

app/core/treema-ext.js:501–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

499
500class CodeTreema extends TreemaNode.nodeMap.ace {
501 constructor () {
502 let mode
503 super(...arguments)
504 this.workingSchema.aceTabSize = 4
505 // Hacky heuristics for finding the right code language in various cases without calling code needing to specify it
506 if (mode = aceUtils.aceEditModes[this.keyForParent]) { this.workingSchema.aceMode = mode }
507 if (mode = aceUtils.aceEditModes[__guard__(__guard__(__guard__(this.parent != null ? this.parent.parent : undefined, x2 => x2.parent), x1 => x1.data), x => x.codeLanguage)]) { this.workingSchema.aceMode = mode }
508 if (mode = aceUtils.aceEditModes[__guard__(__guard__(this.parent != null ? this.parent.parent : undefined, x4 => x4.data), x3 => x3.codeLanguage)]) { this.workingSchema.aceMode = mode }
509 if (mode = aceUtils.aceEditModes[__guard__(this.parent != null ? this.parent.data : undefined, x5 => x5.language)]) { this.workingSchema.aceMode = mode }
510 }
511
512 initEditor (...args) {
513 super.initEditor(...Array.from(args || []))

Callers

nothing calls this directly

Calls 1

__guard__Function · 0.70

Tested by

no test coverage detected