mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 00:40:56 -05:00
Tweaked associating lanks with layers.
This commit is contained in:
parent
3da0ea9d72
commit
b78c91997c
1 changed files with 1 additions and 2 deletions
|
@ -147,8 +147,6 @@ module.exports = LayerAdapter = class LayerAdapter extends CocoClass
|
|||
if lank.thangType?.get('name') is 'Highlight'
|
||||
lank.thangType.set('spriteType', 'segmented')
|
||||
lank.options.resolutionFactor = @resolutionFactor
|
||||
if lank.layer
|
||||
console.warn 'Lank being re-added to a layer?'
|
||||
|
||||
lank.layer = @
|
||||
@listenTo(lank, 'action-needs-render', @onActionNeedsRender)
|
||||
|
@ -161,6 +159,7 @@ module.exports = LayerAdapter = class LayerAdapter extends CocoClass
|
|||
|
||||
removeLank: (lank) ->
|
||||
@stopListening(lank)
|
||||
lank.layer = null
|
||||
@container.removeChild lank.sprite
|
||||
@lanks = _.without @lanks, lank
|
||||
|
||||
|
|
Loading…
Reference in a new issue