Browse Source

fix carbohydrates representation

Yana Rose 4 years ago
parent
commit
1e8287d2e2
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/viewer/helpers/preset.ts

+ 7 - 1
src/viewer/helpers/preset.ts

@@ -171,9 +171,15 @@ export const RcsbSuperpositionRepresentationPreset = StructureRepresentationPres
 
             const { update, builder, typeParams, color } = reprBuilder(plugin, params);
 
+            let typeProps = {};
+            if (expr.type === 'cartoon') {
+                typeProps = {...typeParams, ...cartoonProps}
+            } else {
+                typeProps = {...typeParams}
+            }
             Object.assign(representations, {
                 [expr.label]: builder.buildRepresentation(update, comp, {type: expr.type,
-                    typeParams: { ...typeParams, ...cartoonProps }, color: color as any}, { tag: expr.tag }),
+                    typeParams: typeProps, color: color as any}, { tag: expr.tag }),
             });
 
             await update.commit({ revertOnError: false });