|
@@ -1,5 +1,5 @@
|
|
|
/**
|
|
|
- * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
|
+ * Copyright (c) 2019-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
|
*
|
|
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -94,6 +94,8 @@ export namespace StructureRepresentationPresetProvider {
|
|
|
}
|
|
|
|
|
|
export function updateFocusRepr<T extends ColorTheme.BuiltIn>(plugin: PluginContext, structure: Structure, themeName: T | undefined, themeParams: ColorTheme.BuiltInParams<T> | undefined) {
|
|
|
+ if (!plugin.state.hasBehavior(StructureFocusRepresentation)) return;
|
|
|
+
|
|
|
return plugin.state.updateBehavior(StructureFocusRepresentation, p => {
|
|
|
const c = createStructureColorThemeParams(plugin, structure, 'ball-and-stick', themeName || 'element-symbol', themeParams);
|
|
|
p.surroundingsParams.colorTheme = c;
|