mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Got rid of some memory leaks in the InventoryModal. Fixed fr subscribe section header.
This commit is contained in:
parent
144e1888e0
commit
5ccd5d6d24
3 changed files with 6 additions and 1 deletions
|
@ -331,7 +331,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
|
||||||
prompt_body: "En voulez-vous plus?"
|
prompt_body: "En voulez-vous plus?"
|
||||||
prompt_button: "Entrer dans la boutique"
|
prompt_button: "Entrer dans la boutique"
|
||||||
|
|
||||||
# subscribe:
|
subscribe:
|
||||||
subscribe_title: "Inscription"
|
subscribe_title: "Inscription"
|
||||||
levels: "Débloquer 17 niveaux supplémentaires ! Et 5 nouveaux chaque semaines!"
|
levels: "Débloquer 17 niveaux supplémentaires ! Et 5 nouveaux chaque semaines!"
|
||||||
heroes: "Héros plus puissants!"
|
heroes: "Héros plus puissants!"
|
||||||
|
|
|
@ -87,6 +87,7 @@ module.exports = class WorldMapView extends RootView
|
||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
@setupManager?.destroy()
|
@setupManager?.destroy()
|
||||||
|
@$el.find('.ui-draggable').draggable 'destroy'
|
||||||
$(window).off 'resize', @onWindowResize
|
$(window).off 'resize', @onWindowResize
|
||||||
if ambientSound = @ambientSound
|
if ambientSound = @ambientSound
|
||||||
# Doesn't seem to work; stops immediately.
|
# Doesn't seem to work; stops immediately.
|
||||||
|
|
|
@ -534,6 +534,7 @@ module.exports = class InventoryModal extends ModalView
|
||||||
|
|
||||||
onScrollUnequipped: ->
|
onScrollUnequipped: ->
|
||||||
# dynamically load visible items when the user scrolls enough to see them
|
# dynamically load visible items when the user scrolls enough to see them
|
||||||
|
return if @destroyed
|
||||||
nanoContent = @$el.find('#unequipped .nano-content')
|
nanoContent = @$el.find('#unequipped .nano-content')
|
||||||
items = nanoContent.find('.item:visible:not(.loaded)')
|
items = nanoContent.find('.item:visible:not(.loaded)')
|
||||||
threshold = nanoContent.height() + 100
|
threshold = nanoContent.height() + 100
|
||||||
|
@ -591,6 +592,9 @@ module.exports = class InventoryModal extends ModalView
|
||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
@$el.find('.unlock-button').popover 'destroy'
|
@$el.find('.unlock-button').popover 'destroy'
|
||||||
|
@$el.find('.ui-droppable').droppable 'destroy'
|
||||||
|
@$el.find('.ui-draggable').draggable('destroy').off 'dragstart'
|
||||||
|
@$el.find('.item-slot').off 'dragstart'
|
||||||
@stage?.removeAllChildren()
|
@stage?.removeAllChildren()
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue