Ctrl/cmd+click a level in campign editor to open level editor in new tab.

This commit is contained in:
Nick Winter 2014-12-29 13:22:35 -08:00
parent 728f726748
commit a5b5bb1085

View file

@ -201,8 +201,11 @@ module.exports = class CampaignEditorView extends RootView
onCampaignLevelClicked: (levelOriginal) -> onCampaignLevelClicked: (levelOriginal) ->
return unless levelTreema = @treema.childrenTreemas?.levels?.childrenTreemas?[levelOriginal] return unless levelTreema = @treema.childrenTreemas?.levels?.childrenTreemas?[levelOriginal]
if key.ctrl
url = "/editor/level/#{levelTreema.data.slug}"
window.open url, '_blank'
levelTreema.select() levelTreema.select()
# levelTreema.open() #levelTreema.open()
onCampaignLevelDoubleClicked: (levelOriginal) -> onCampaignLevelDoubleClicked: (levelOriginal) ->
@openCampaignLevelView @supermodel.getModelByOriginal Level, levelOriginal @openCampaignLevelView @supermodel.getModelByOriginal Level, levelOriginal