madreher / radahn

Radahn is an interactive molecular dynamic application allowing users to steer their MD simulations and getting live feedback. The framework is currently build around LAMMPS as a simulation backend and will be extended to Gromacs in the future.
MIT License
0 stars 0 forks source link

Context menu save image not working properly on the molecule viewer #66

Closed madreher closed 1 month ago

madreher commented 1 month ago

When doing a right click on the molecule viewer, the context menu does appear. However, the save image function only saves a fully transparent image.

madreher commented 1 month ago

This issue is due to the fact that there is a transparent overlay on top of the molecule viewer to draw a selection rectangle, and they overlay is receiving the context menu event.

However, the 3dmol.js library also does disable the default context menu. This is to enable a context menu when clicking on atoms. While this feature is not currently used now, it is probably better to maintain this behavior for later. Instead, it would be better to create a dedicated button to save the current frame as screenshot.