Преглед на файлове

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

Jason Pattle преди 2 години
родител
ревизия
ba927b0490
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 2 2
      src/mol-theme/color/model-index.ts
  2. 1 1
      src/mol-theme/color/trajectory-index.ts

+ 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> {