jupyter-widgets-contrib / ipytree

A Tree Widget using Jupyter-widgets protocol and jsTree
MIT License
130 stars 27 forks source link

How to get return value? #59

Open sanitamainali opened 2 years ago

sanitamainali commented 2 years ago

How do we get a value whenever we click on the node? In below code: ImageType=Tree() ImageType.add_node(Node('Landsat',[Node('Collection 1', [Node('Suface Reflectance', [Node('Landsat 8'),Node('Landsat 7')] ), Node('Top Of Atmosphere', [Node('Landsat 8'),Node('Landsat 7')] )]), Node('Collection 2', [Node('Suface Reflectance', [Node('Landsat 8'),Node('Landsat 7')] ), Node('Top Of Atmosphere', [Node('Landsat 8'),Node('Landsat 7')] )])])) ImageType.add_node(Node('Sentinel', [Node('Sentinel-1 SAR'),Node('Sentinel-2 MSI'),Node('Sentinel-3 OLCI EFR')] )) ImageType How do I get for example a 'LS8SRC!' text or anything as the value if I click Landsat 8 under landsat8 collection1 and surface reflectance? sorry for messy code & english.