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

Method onClickLevel

app/views/play/CampaignView.js:1888–1904  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1886 }
1887
1888 onClickLevel (e) {
1889 e.preventDefault()
1890 e.stopPropagation()
1891 this.$levelInfo?.hide()
1892 const levelElement = $(e.target).closest('.level')
1893 const levelSlug = levelElement.data('level-slug')
1894 if (!levelSlug) { return } // Roblox Modal
1895 const levelOriginal = levelElement.data('level-original')
1896 if (this.editorMode) {
1897 return this.trigger('level-clicked', levelOriginal)
1898 }
1899 this.$levelInfo = this.$el.find(`.level-info-container[data-level-slug=${levelSlug}]`).show()
1900 this.checkForCourseOption(levelOriginal)
1901 this.adjustLevelInfoPosition(e)
1902 this.endHighlight()
1903 this.preloadLevel(levelSlug)
1904 }
1905
1906 onClickScenario (e) {
1907 if (!this.editorMode) { return }

Callers

nothing calls this directly

Calls 5

checkForCourseOptionMethod · 0.95
preloadLevelMethod · 0.95
dataMethod · 0.80
hideMethod · 0.45

Tested by

no test coverage detected