()
| 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) { |
no test coverage detected