diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index f68965bc3..bcc398bbc 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -228,6 +228,8 @@ module.exports = class ThangsTabView extends View console.log e for thang in e.thangs console.log thang.id, thang.pos + @selectAddThangType thang.id + @addThang @addThangType, thang.pos # 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) -> @@ -280,6 +282,7 @@ module.exports = class ThangsTabView extends View @selectAddThang {target: icons[nextSelectedIndex]} selectAddThangType: (type, @cloneSourceThang) -> + console.log type if _.isString type type = _.find @supermodel.getModels(ThangType), (m) -> m.get('name') is type pos = @addThangSprite?.thang.pos # Maintain old sprite's pos if we have it @@ -397,6 +400,7 @@ module.exports = class ThangsTabView extends View @editThang thangID: id if id addThang: (thangType, pos) -> + console.log thangType, pos thangID = Thang.nextID(thangType.get('name'), @world) until thangID and not @thangsTreema.get "id=#{thangID}" if @cloneSourceThang components = _.cloneDeep @thangsTreema.get "id=#{@cloneSourceThang.id}/components"