mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -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_button: "Entrer dans la boutique"
|
||||
|
||||
# subscribe:
|
||||
subscribe:
|
||||
subscribe_title: "Inscription"
|
||||
levels: "Débloquer 17 niveaux supplémentaires ! Et 5 nouveaux chaque semaines!"
|
||||
heroes: "Héros plus puissants!"
|
||||
|
|
|
@ -87,6 +87,7 @@ module.exports = class WorldMapView extends RootView
|
|||
|
||||
destroy: ->
|
||||
@setupManager?.destroy()
|
||||
@$el.find('.ui-draggable').draggable 'destroy'
|
||||
$(window).off 'resize', @onWindowResize
|
||||
if ambientSound = @ambientSound
|
||||
# Doesn't seem to work; stops immediately.
|
||||
|
|
|
@ -534,6 +534,7 @@ module.exports = class InventoryModal extends ModalView
|
|||
|
||||
onScrollUnequipped: ->
|
||||
# dynamically load visible items when the user scrolls enough to see them
|
||||
return if @destroyed
|
||||
nanoContent = @$el.find('#unequipped .nano-content')
|
||||
items = nanoContent.find('.item:visible:not(.loaded)')
|
||||
threshold = nanoContent.height() + 100
|
||||
|
@ -591,6 +592,9 @@ module.exports = class InventoryModal extends ModalView
|
|||
|
||||
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()
|
||||
super()
|
||||
|
||||
|
|
Loading…
Reference in a new issue