浏览代码

reset focus repr color params

to element-symbol, when no theme given
Alexander Rose 4 年之前
父节点
当前提交
104666a13e
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/mol-plugin-state/builder/structure/representation-preset.ts

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