Parcourir la source

returned clone of theme params for model and trajectory index themes, added contributor name

Jason Pattle il y a 2 ans
Parent
commit
ba927b0490

+ 2 - 2
src/mol-theme/color/model-index.ts

@@ -1,7 +1,7 @@
 /**
  * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
  *
- * @author Alexander Rose <alexander.rose@weirdbyte.de>
+ * @author Jason Pattle <jpattle@exscientia.co.uk>
  */
 
 import { Color } from '../../mol-util/color';
@@ -21,7 +21,7 @@ export const ModelIndexColorThemeParams = {
 };
 export type ModelIndexColorThemeParams = typeof ModelIndexColorThemeParams
 export function getModelIndexColorThemeParams(ctx: ThemeDataContext) {
-    return ModelIndexColorThemeParams; // TODO return copy
+    return PD.clone(ModelIndexColorThemeParams);
 }
 
 export function ModelIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<ModelIndexColorThemeParams>): ColorTheme<ModelIndexColorThemeParams> {

+ 1 - 1
src/mol-theme/color/trajectory-index.ts

@@ -21,7 +21,7 @@ export const TrajectoryIndexColorThemeParams = {
 };
 export type TrajectoryIndexColorThemeParams = typeof TrajectoryIndexColorThemeParams
 export function getTrajectoryIndexColorThemeParams(ctx: ThemeDataContext) {
-    return TrajectoryIndexColorThemeParams; // TODO return copy
+    return PD.clone(TrajectoryIndexColorThemeParams);
 }
 
 export function TrajectoryIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<TrajectoryIndexColorThemeParams>): ColorTheme<TrajectoryIndexColorThemeParams> {