Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Add TreeView methods to attach file-event handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Sep 7, 2016
1 parent 5981f47 commit c088550
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/tree-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ class TreeView extends View
@disposables.dispose()
@detach() if @panel?

onDirectoryCreated: (callback) ->
@emitter.on('directory-created', callback)

onEntryCopied: (callback) ->
@emitter.on('entry-copied', callback)

onEntryDeleted: (callback) ->
@emitter.on('entry-deleted', callback)

onEntryMoved: (callback) ->
@emitter.on('entry-moved', callback)

onFileCreated: (callback) ->
@emitter.on('file-created', callback)

handleEvents: ->
@on 'dblclick', '.tree-view-resize-handle', =>
@resizeToFitContent()
Expand Down

0 comments on commit c088550

Please sign in to comment.