LiteMol
LiteMol copied to clipboard
How to listen to event 'loaded'?
Is there an event, which tells me if the viewer has been fully loaded? If so, how do I use it?
If you mean the plugin, calling Plugin.create()
is a synchronous and should be called after the DOM element that should contain the plugin has been loaded using standard practices.
If you mean loading a molecule, the plugin.applyTransform
function returns a Promise and can be used for example like this or using async/await.
EDIT: and if you mean the PDB Component Library plugin, best place would be to ask Mandar Deshpande in Hinxton.