From 104666a13ef4739db91135d04821158b3a60ef4f Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Mon, 13 Jul 2020 21:08:02 -0700
Subject: [PATCH] reset focus repr color params

to element-symbol, when no theme given
---
 .../builder/structure/representation-preset.ts                | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mol-plugin-state/builder/structure/representation-preset.ts b/src/mol-plugin-state/builder/structure/representation-preset.ts
index 3eb9bdf53..887e28e5d 100644
--- a/src/mol-plugin-state/builder/structure/representation-preset.ts
+++ b/src/mol-plugin-state/builder/structure/representation-preset.ts
@@ -59,10 +59,8 @@ export namespace StructureRepresentationPresetProvider {
     }
 
     export function updateFocusRepr<T extends ColorTheme.BuiltIn>(plugin: PluginContext, structure: Structure, themeName: T | undefined, themeParams: ColorTheme.BuiltInParams<T> | undefined) {
-        if (!themeName && !themeParams) return;
-
         return plugin.state.updateBehavior(StructureFocusRepresentation, p => {
-            const c = createStructureColorThemeParams(plugin, structure, 'ball-and-stick', themeName, themeParams);
+            const c = createStructureColorThemeParams(plugin, structure, 'ball-and-stick', themeName || 'element-symbol', themeParams);
             p.surroundingsParams.colorTheme = c;
             p.targetParams.colorTheme = c;
         });
-- 
GitLab