gabrielelanaro / chemview

The new generation molecular viewer for IPython notebook
GNU Lesser General Public License v2.1
81 stars 17 forks source link

Python camera manipulation #10

Closed gabrielelanaro closed 9 years ago

gabrielelanaro commented 9 years ago

A way to syncronize "cameras" across different widgets from an user perspective my idea would be:

from IPython.display import display
from IPython.utils.traitlets import link

mv1 = MolecularViewer() # returns an IPython widget
mv2 = MolecularViewer()

link(mv1.camera, mv2.camera) # Now the cameras are linked
display(v1)
display(v2)