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

Method destroy

app/views/play/CampaignView.js:408–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406 }
407
408 destroy () {
409 this.setupManager?.destroy()
410 this.$el.find('.ui-draggable').off().draggable('destroy')
411 window.removeEventListener('resize', this.onWindowResize)
412 const ambientSound = this.ambientSound
413 if (ambientSound) {
414 // Doesn't seem to work; stops immediately.
415 createjs.Tween.get(ambientSound).to({ volume: 0.0 }, 1500).call(() => ambientSound.stop())
416 }
417 this.musicPlayer?.destroy()
418 this.removeMusicGestureListeners()
419 clearTimeout(this.playMusicTimeout)
420 clearInterval(this.portalScrollInterval)
421 Backbone.Mediator.unsubscribe('audio-player:loaded', this.playAmbientSound, this)
422 super.destroy()
423 }
424
425 showLoading ($el) {
426 if (!this.campaign) {

Callers 1

startLevelMethod · 0.45

Calls 3

getMethod · 0.45
unsubscribeMethod · 0.45

Tested by

no test coverage detected