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

Method buildTreema

app/views/editor/course/CourseEditView.js:66–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 }
65
66 buildTreema () {
67 if ((this.treema != null) || (!this.course.loaded)) { return }
68 const data = $.extend(true, {}, this.course.attributes)
69 const options = {
70 data,
71 filePath: `db/course/${this.course.get('_id')}`,
72 schema: Course.schema,
73 readOnly: me.get('anonymous'),
74 supermodel: this.supermodel,
75 nodeClasses: {
76 'concepts-list': nodes.conceptNodes(this.concepts.models).ConceptsListNode,
77 concept: nodes.conceptNodes(this.concepts.models).ConceptNode
78 }
79 }
80 this.treema = this.$el.find('#course-treema').treema(options)
81 this.treema.build()
82 return (this.treema.childrenTreemas.rewards != null ? this.treema.childrenTreemas.rewards.open(3) : undefined)
83 }
84
85 afterRender () {
86 super.afterRender()

Callers 1

onConceptsLoadedMethod · 0.95

Calls 2

getMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected