mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-04 17:19:47 -04:00
Merge pull request #3754 from Zerrien/campaign-treema-display
Clicking on level in treema makes the level flash
This commit is contained in:
commit
b8bdc0c726
1 changed files with 8 additions and 0 deletions
|
@ -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/'
|
||||
|
|
Loading…
Add table
Reference in a new issue