Yana Rose преди 4 години
родител
ревизия
749cd8ab94
променени са 1 файла, в които са добавени 3 реда и са изтрити 4 реда
  1. 3 4
      src/viewer/helpers/preset.ts

+ 3 - 4
src/viewer/helpers/preset.ts

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