mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed cloning.
This commit is contained in:
parent
a82a6a4188
commit
e2db421d1c
1 changed files with 3 additions and 3 deletions
|
@ -220,7 +220,7 @@ module.exports = class ThangsTabView extends View
|
|||
target = target.closest('.add-thang-palette-icon')
|
||||
wasSelected = target.hasClass 'selected'
|
||||
@$el.find('.add-thangs-palette .add-thang-palette-icon.selected').removeClass('selected')
|
||||
@selectAddThangType(if wasSelected then null else target.attr 'data-thang-type')
|
||||
@selectAddThangType(if wasSelected then null else target.attr 'data-thang-type') unless key.alt or key.meta
|
||||
target.addClass('selected') if @addThangType
|
||||
false
|
||||
|
||||
|
@ -239,7 +239,7 @@ module.exports = class ThangsTabView extends View
|
|||
@surface.spriteBoss.removeSprite @addThangSprite if @addThangSprite
|
||||
@addThangType = type
|
||||
if @addThangType
|
||||
@surface.camera.lock() # hmm, this interfere with zooming
|
||||
@surface.camera.lock()
|
||||
thang = @createAddThang()
|
||||
@addThangSprite = @surface.spriteBoss.addThangToSprites thang, @surface.spriteBoss.spriteLayers["Floating"]
|
||||
@addThangSprite.notOfThisWorld = true
|
||||
|
@ -334,7 +334,7 @@ module.exports = class ThangsTabView extends View
|
|||
@world.loadFromLevel serializedLevel, false
|
||||
thang.isSelectable = not thang.isLand for thang in @world.thangs # let us select walls and such
|
||||
@surface?.setWorld @world
|
||||
@selectAddThangType @addThangType if @addThangType # make another addThang sprite, since the World just refreshed
|
||||
@selectAddThangType @addThangType, @cloneSourceThang if @addThangType # make another addThang sprite, since the World just refreshed
|
||||
Backbone.Mediator.publish 'level-thangs-changed', thangsData: @thangsTreema.data
|
||||
null
|
||||
|
||||
|
|
Loading…
Reference in a new issue