Last active
August 29, 2015 14:00
-
-
Save dcunited08/0f4b99ea895579cc66f5 to your computer and use it in GitHub Desktop.
Recommended API for tree-view to allow custom nodes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myCallbackFunc: (node) => | |
node.on "click", => | |
#do something | |
node.on "delete", => | |
#do something else | |
atom.project.tree-view().addNode | |
text: "node text" #text to be displayed | |
class: "my-special-node" #optional, adds extra class but a class is added for each package as well | |
parentNode: parentNode #optional if you are making a sub node | |
callback: myCallbackFunc #required, calls back with details to update and subscribe to events on that node | |
atom.project.tree-view().removeNode | |
node: nodeID | |
force: false #fail removal of the node if it has children | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment