Alexander Rose 6 years ago
parent
commit
171cda89fe
3 changed files with 5 additions and 9 deletions
  1. 1 5
      src/mol-repr/representation.ts
  2. 2 3
      src/mol-theme/color.ts
  3. 2 1
      src/mol-theme/size.ts

+ 1 - 5
src/mol-repr/representation.ts

@@ -188,11 +188,7 @@ namespace Representation {
                 }
                 return renderObjects
             },
-            get props() {
-                const props = {}
-                reprList.forEach(r => Object.assign(props, r.props))
-                return props as P
-            },
+            get props() { return currentProps },
             get params() { return currentParams },
             createOrUpdate: (props: Partial<P> = {}, data?: D) => {
                 if (data && data !== currentData) {

+ 2 - 3
src/mol-theme/color.ts

@@ -29,8 +29,6 @@ import { TableLegend } from 'mol-util/color/tables';
 
 export type LocationColor = (location: Location, isSecondary: boolean) => Color
 
-export type ColorThemeProps = { [k: string]: any }
-
 export { ColorTheme }
 interface ColorTheme<P extends PD.Params> {
     readonly factory: ColorTheme.Factory<P>
@@ -75,4 +73,5 @@ export const BuiltInColorThemes = {
     'shape-group': ShapeGroupColorThemeProvider,
     'unit-index': UnitIndexColorThemeProvider,
     'uniform': UniformColorThemeProvider,
-}
+}
+export type BuiltInColorThemeName = keyof typeof BuiltInColorThemes

+ 2 - 1
src/mol-theme/size.ts

@@ -43,4 +43,5 @@ export const BuiltInSizeThemes = {
     'physical': PhysicalSizeThemeProvider,
     'shape-group': ShapeGroupSizeThemeProvider,
     'uniform': UniformSizeThemeProvider
-}
+}
+export type BuiltInSizeThemeName = keyof typeof BuiltInSizeThemes