Browse Source

fixed colorTheme.structure assignment

Alexander Rose 6 years ago
parent
commit
91a3197d9b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-geo/representation/structure/units-visual.ts

+ 1 - 1
src/mol-geo/representation/structure/units-visual.ts

@@ -71,6 +71,7 @@ export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisu
         if (!renderObject) return
 
         const newProps = Object.assign({}, currentProps, props)
+        newProps.colorTheme.structure = currentStructure
         const unit = currentGroup.units[0]
 
         locationIt.reset()
@@ -131,7 +132,6 @@ export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisu
             } else {
                 if (group && !areGroupsIdentical(group, currentGroup)) {
                     currentGroup = group
-                    currentProps.colorTheme.structure = currentStructure
                 }
                 await update(ctx, props)
             }