Browse Source

fix volume streaming for entries with multiple contour lists

Sebastian Bittrich 3 years ago
parent
commit
324ab3744b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/mol-plugin/behavior/dynamic/volume-streaming/util.ts

+ 2 - 1
src/mol-plugin/behavior/dynamic/volume-streaming/util.ts

@@ -69,7 +69,8 @@ export async function getContourLevel(provider: 'emdb' | 'pdbe', plugin: PluginC
 export async function getContourLevelEmdb(plugin: PluginContext, taskCtx: RuntimeContext, emdbId: string) {
     const emdbHeaderServer = plugin.config.get(PluginConfig.VolumeStreaming.EmdbHeaderServer);
     const header = await plugin.fetch({ url: `${emdbHeaderServer}/${emdbId.toUpperCase()}/header/${emdbId.toLowerCase()}.xml`, type: 'xml' }).runInContext(taskCtx);
-    const contours = header.getElementsByTagName('contour');
+    const map = header.getElementsByTagName('map')[0];
+    const contours = map.getElementsByTagName('contour');
 
     let primaryContour = contours[0];
     for (let i = 1; i < contours.length; i++) {