cbouy / mols2grid

Interactive molecule viewer for 2D structures
https://mols2grid.readthedocs.io
Apache License 2.0
206 stars 25 forks source link

Bug & feature request with selections #22

Closed cbouy closed 2 years ago

cbouy commented 2 years ago

Discussed in https://github.com/cbouy/mols2grid/discussions/19

Originally posted by **PatWalters** October 17, 2021 The callback feature is very useful, thanks! I've been trying to figure out how to implement an enhanced cluster viewer. I've been able to put together an example where I can click on a cluster center in one grid and show the cluster members in a second grid. The part I'm missing is capturing the selections in the cluster member grid. If I click on a cluster in the cluster center grid a second time, the cluster member selections are cleared. Is there a way around this? My example code is in this gist. https://gist.github.com/PatWalters/ffffa4612e2c143ab7389e539a5c88f7 Also, it would be useful to be able to have a callback in the cluster center grid when checkboxes are not present. However, it appears that when selection=False, clicks in the grid are not recognized.