ソースを参照

reset focus repr color params

to element-symbol, when no theme given
Alexander Rose 4 年 前
コミット
104666a13e

+ 1 - 3
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;
         });