Skip to content
Snippets Groups Projects
Commit 6c8ae32f authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: do not update focus theme if not set

parent e67c610b
Branches
No related tags found
No related merge requests found
...@@ -55,6 +55,8 @@ export namespace StructureRepresentationPresetProvider { ...@@ -55,6 +55,8 @@ export namespace StructureRepresentationPresetProvider {
} }
export function updateFocusRepr<T extends ColorTheme.BuiltIn>(plugin: PluginContext, structure: Structure, themeName: T | undefined, themeParams: ColorTheme.BuiltInParams<T> | undefined) { 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 => { 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, themeParams);
p.surroundingsParams.colorTheme = c; p.surroundingsParams.colorTheme = c;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment