Explorar o código

TS compile warning fixed

cycle20 hai 1 ano
pai
achega
bb737e3a75
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 2 2
      src/apps/tm-viewer/index.html
  2. 3 3
      src/extensions/tmdet/behavior.ts

+ 2 - 2
src/apps/tm-viewer/index.html

@@ -75,8 +75,8 @@
 
             function load(pdbId) {
                 tm_molstar.loadWithUNITMPMembraneRepresentation(viewer.plugin, {
-                    structureUrl: `https://cs.litemol.org/${pdbId}/full`,
-                    regionDescriptorUrl: `http://localhost:8000/tmdet-data/${pdbId}.json`,
+                    structureUrl: `https://files.rcsb.org/download/${pdbId}.cif`,
+                    regionDescriptorUrl: `./tmdet-data/${pdbId}.json`,
                 });
             }
 

+ 3 - 3
src/extensions/tmdet/behavior.ts

@@ -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> {