Browse Source

added defaultColorTheme and defaultSizeTheme to ReprProvider

Alexander Rose 6 years ago
parent
commit
eecf0f315c

+ 2 - 0
src/mol-repr/representation.ts

@@ -40,6 +40,8 @@ export interface RepresentationProvider<D, P extends PD.Params> {
     readonly factory: RepresentationFactory<D, P>
     readonly getParams: RepresentationParamsGetter<D, P>
     readonly defaultValues: PD.Values<P>
+    readonly defaultColorTheme: string
+    readonly defaultSizeTheme: string
 }
 
 export type AnyRepresentationProvider = RepresentationProvider<any, {}>

+ 3 - 1
src/mol-repr/structure/representation/ball-and-stick.ts

@@ -48,5 +48,7 @@ export const BallAndStickRepresentationProvider: StructureRepresentationProvider
     description: 'Displays atoms as spheres and bonds as cylinders.',
     factory: BallAndStickRepresentation,
     getParams: getBallAndStickParams,
-    defaultValues: PD.getDefaultValues(BallAndStickParams)
+    defaultValues: PD.getDefaultValues(BallAndStickParams),
+    defaultColorTheme: 'element-symbol',
+    defaultSizeTheme: 'uniform'
 }

+ 3 - 1
src/mol-repr/structure/representation/carbohydrate.ts

@@ -43,5 +43,7 @@ export const CarbohydrateRepresentationProvider: StructureRepresentationProvider
     description: 'Displays carbohydrate symbols (3D SNFG).',
     factory: CarbohydrateRepresentation,
     getParams: getCarbohydrateParams,
-    defaultValues: PD.getDefaultValues(CarbohydrateParams)
+    defaultValues: PD.getDefaultValues(CarbohydrateParams),
+    defaultColorTheme: 'carbohydrate-symbol',
+    defaultSizeTheme: 'uniform'
 }

+ 3 - 1
src/mol-repr/structure/representation/cartoon.ts

@@ -47,5 +47,7 @@ export const CartoonRepresentationProvider: StructureRepresentationProvider<Cart
     description: 'Displays a ribbon smoothly following the trace atoms of polymers.',
     factory: CartoonRepresentation,
     getParams: getCartoonParams,
-    defaultValues: PD.getDefaultValues(CartoonParams)
+    defaultValues: PD.getDefaultValues(CartoonParams),
+    defaultColorTheme: 'polymer-id',
+    defaultSizeTheme: 'uniform'
 }

+ 3 - 1
src/mol-repr/structure/representation/molecular-surface.ts

@@ -43,5 +43,7 @@ export const MolecularSurfaceRepresentationProvider: StructureRepresentationProv
     description: 'Displays a gaussian molecular surface.',
     factory: MolecularSurfaceRepresentation,
     getParams: getMolecularSurfaceParams,
-    defaultValues: PD.getDefaultValues(MolecularSurfaceParams)
+    defaultValues: PD.getDefaultValues(MolecularSurfaceParams),
+    defaultColorTheme: 'polymer-id',
+    defaultSizeTheme: 'uniform'
 }

+ 3 - 1
src/mol-repr/volume/direct-volume.ts

@@ -192,5 +192,7 @@ export const DirectVolumeRepresentationProvider: VolumeRepresentationProvider<Di
     description: 'Direct volume rendering of volumetric data.',
     factory: DirectVolumeRepresentation,
     getParams: getDirectVolumeParams,
-    defaultValues: PD.getDefaultValues(DirectVolumeParams)
+    defaultValues: PD.getDefaultValues(DirectVolumeParams),
+    defaultColorTheme: 'uniform',
+    defaultSizeTheme: 'uniform'
 }

+ 3 - 1
src/mol-repr/volume/isosurface-mesh.ts

@@ -77,5 +77,7 @@ export const IsosurfaceRepresentationProvider: VolumeRepresentationProvider<Isos
     description: 'Displays an isosurface of volumetric data.',
     factory: IsosurfaceRepresentation,
     getParams: getIsosurfaceParams,
-    defaultValues: PD.getDefaultValues(IsosurfaceParams)
+    defaultValues: PD.getDefaultValues(IsosurfaceParams),
+    defaultColorTheme: 'uniform',
+    defaultSizeTheme: 'uniform'
 }