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

Method buildTreema

app/views/editor/chat/ChatEditView.js:61–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }
60
61 buildTreema () {
62 if ((this.treema != null) || (!this.chat.loaded)) { return }
63 const data = $.extend(true, {}, this.chat.attributes)
64 const options = {
65 data,
66 filePath: `db/chat_message/${this.chat.get('_id')}`,
67 schema: ChatMessage.schema,
68 readOnly: me.get('anonymous'),
69 supermodel: this.supermodel
70 }
71 this.treema = this.$el.find('#chat-treema').treema(options)
72 this.treema.build()
73 if (this.treema.childrenTreemas.message != null) {
74 this.treema.childrenTreemas.message.open(2)
75 }
76 if (this.treema.childrenTreemas.context != null) {
77 this.treema.childrenTreemas.context.open(2)
78 }
79 __guard__(this.treema.childrenTreemas.context != null ? this.treema.childrenTreemas.context.childrenTreemas.i18n : undefined, x => x.close())
80 return __guard__(this.treema.childrenTreemas.context != null ? this.treema.childrenTreemas.context.childrenTreemas.apiProperties : undefined, x1 => x1.close())
81 }
82
83 afterRender () {
84 let left

Callers 1

onLoadedMethod · 0.95

Calls 3

__guard__Function · 0.70
getMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected