This commit is contained in:
Nick Winter 2014-03-28 09:52:07 -07:00
parent 84cb0bfd0d
commit 62867534a7
2 changed files with 2 additions and 3 deletions

View file

@ -219,7 +219,7 @@ module.exports = class ThangsTabView extends View
# TODO: figure out a good way to have all Surface clicks and Treema clicks just proxy in one direction, so we can maintain only one way of handling selection and deletion
onExtantThangSelected: (e) ->
@selectedExtantSprite?.setNameLabel null unless @selectedExtantSprite is e.sprite
@selectedExtantSprite?.setNameLabel? null unless @selectedExtantSprite is e.sprite
@selectedExtantThang = e.thang
@selectedExtantSprite = e.sprite
if e.thang and (key.alt or key.meta)
@ -236,7 +236,7 @@ module.exports = class ThangsTabView extends View
@selectedExtantSprite.setNameLabel @selectedExtantSprite.thangType.get('name') + ': ' + @selectedExtantThang.id
if not treemaThang.isSelected()
treemaThang.select()
@thangsTreema.$el.scrollTop(@thangsTreema.$el.find('.treema-children .treema-selected')[0].offsetTop)
@thangsTreema.$el.scrollTop(@thangsTreema.$el.find('.treema-children .treema-selected')[0].offsetTop)
else if @addThangSprite
# We clicked on the background when we had an add Thang selected, so add it
@addThang @addThangType, @addThangSprite.thang.pos

View file

@ -130,7 +130,6 @@ module.exports = class TomeView extends View
unless method.cloneOf
skipProtectAPI = @getQueryVariable "skip_protect_api", not @options.ladderGame
skipFlow = @getQueryVariable "skip_flow", @options.levelID is 'brawlwood'
console.log 'skip protect api', skipProtectAPI, 'skip flow', skipFlow
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: skipFlow, skipProtectAPI: skipProtectAPI, worker: @worker
for thangID, spellKeys of @thangSpells
thang = world.getThangByID thangID