Skip to content

Commit

Permalink
Trigger refresh event handler when refreshing whole body
Browse files Browse the repository at this point in the history
  • Loading branch information
s0ber committed Nov 27, 2014
1 parent 0dff5cf commit 7c4ff51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vtree_src/launcher.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Launcher
return if @isRefreshEventInitialized()
@setRefreshEventAsInitialized()

$('body').on 'refresh', '*' , (e) =>
refreshHandler = (e) =>
e.stopPropagation()

# finding closest element with node (it can be actually e.currentTarget)
Expand All @@ -49,6 +49,9 @@ class Launcher
node = @treeManager.nodesCache.getById(nodeId)
@treeManager.refresh(node)

$('body').on 'refresh', refreshHandler
$('body').on 'refresh', '*' , refreshHandler

@createViewsTree: ->
@treeManager.createTree()

Expand Down

0 comments on commit 7c4ff51

Please sign in to comment.