Merge pull request from Zerrien/campaign-treema-display

Clicking on level in treema makes the level flash
This commit is contained in:
Josh Callebaut 2016-06-22 15:56:54 -07:00 committed by GitHub
commit b8bdc0c726

View file

@ -239,6 +239,14 @@ module.exports = class CampaignEditorView extends RootView
@campaign.set key, value for key, value of @treema.data
@campaignView.setCampaign(@campaign)
onTreemaSelectionChanged: (e, node) =>
return unless node[0]?.data?.original?
elem = @$("div[data-level-original='#{node[0].data.original}']")
elem.toggle('pulsate')
setTimeout ()->
elem.toggle('pulsate')
, 1000
onTreemaDoubleClicked: (e, node) =>
path = node.getPath()
return unless _.string.startsWith path, '/levels/'