mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Undid a listenTo on a jQuery elem.
This commit is contained in:
parent
57f6f4d244
commit
53118984ff
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,7 @@ module.exports = class SpectateLevelView extends View
|
|||
constructor: (options, @levelID) ->
|
||||
console.profile?() if PROFILE_ME
|
||||
super options
|
||||
@listenTo($(window), 'resize', @onWindowResize)
|
||||
$(window).on('resize', @onWindowResize)
|
||||
@listenToOnce(@supermodel, 'error', @onLevelLoadError)
|
||||
|
||||
@sessionOne = @getQueryVariable 'session-one'
|
||||
|
@ -470,6 +470,7 @@ module.exports = class SpectateLevelView extends View
|
|||
@levelLoader?.destroy()
|
||||
@surface?.destroy()
|
||||
@god?.destroy()
|
||||
$(window).off('resize', @onWindowResize)
|
||||
@goalManager?.destroy()
|
||||
@scriptManager?.destroy()
|
||||
delete window.world # not sure where this is set, but this is one way to clean it up
|
||||
|
|
Loading…
Reference in a new issue