|
@@ -137,10 +137,10 @@ export async function loadWithUNITMPMembraneRepresentation(plugin: PluginUIConte
|
|
|
storeCameraSnapshot(plugin); // store if it is not stored yet
|
|
|
|
|
|
loadInitialSnapshot(plugin); // load if there is a stored one
|
|
|
- setTimeout(() => plugin.clear(), 100); // clear scene after some delay
|
|
|
+ setTimeout(() => { plugin.clear(); }, 100); // clear scene after some delay
|
|
|
|
|
|
|
|
|
- setTimeout(async () => {
|
|
|
+ setTimeout(() => { (async () => {
|
|
|
const pdbtmDescriptor: PDBTMDescriptor = await downloadRegionDescriptor(plugin, params);
|
|
|
TmDetDescriptorCache.add(pdbtmDescriptor);
|
|
|
|
|
@@ -155,7 +155,7 @@ export async function loadWithUNITMPMembraneRepresentation(plugin: PluginUIConte
|
|
|
// It also resets the camera because the membranes render 1st and the structure might not be fully visible
|
|
|
//
|
|
|
rotateCamera(plugin);
|
|
|
- }, 500);
|
|
|
+ })(); }, 500);
|
|
|
}
|
|
|
|
|
|
async function downloadRegionDescriptor(plugin: PluginUIContext, params: any): Promise<any> {
|