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

Method onLevelsLoaded

app/views/artisans/LevelConceptMap.js:117–129  ·  view source on GitHub ↗
(campaignSlug, lvlCollection)

Source from the content-addressed store, hash-verified

115 }
116
117 onLevelsLoaded (campaignSlug, lvlCollection) {
118 for (let k = 0; k < lvlCollection.models.length; k++) {
119 const level = lvlCollection.models[k]
120 level.campaign = campaignSlug
121 if (this.loadedLevels[campaignSlug] == null) { this.loadedLevels[campaignSlug] = {} }
122 if (ll == null) { var ll = {} }
123 level.seqNo = lvlCollection.models.length - k
124 this.loadedLevels[campaignSlug][level.get('slug')] = level
125 }
126 if (--this.unloadedCampaigns === 0) {
127 return this.onAllLevelsLoaded()
128 }
129 }
130
131 onAllLevelsLoaded () {
132 this.concepts = new Concepts([])

Callers

nothing calls this directly

Calls 2

onAllLevelsLoadedMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected