From eecf0f315cc98a1f899c691607fbd63002c7502a Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Mon, 26 Nov 2018 18:21:01 -0800 Subject: [PATCH] added defaultColorTheme and defaultSizeTheme to ReprProvider --- src/mol-repr/representation.ts | 2 ++ src/mol-repr/structure/representation/ball-and-stick.ts | 4 +++- src/mol-repr/structure/representation/carbohydrate.ts | 4 +++- src/mol-repr/structure/representation/cartoon.ts | 4 +++- src/mol-repr/structure/representation/molecular-surface.ts | 4 +++- src/mol-repr/volume/direct-volume.ts | 4 +++- src/mol-repr/volume/isosurface-mesh.ts | 4 +++- 7 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/mol-repr/representation.ts b/src/mol-repr/representation.ts index b26d4e412..8a3374956 100644 --- a/src/mol-repr/representation.ts +++ b/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, {}> diff --git a/src/mol-repr/structure/representation/ball-and-stick.ts b/src/mol-repr/structure/representation/ball-and-stick.ts index 3fcb18507..be1559e10 100644 --- a/src/mol-repr/structure/representation/ball-and-stick.ts +++ b/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' } \ No newline at end of file diff --git a/src/mol-repr/structure/representation/carbohydrate.ts b/src/mol-repr/structure/representation/carbohydrate.ts index 2aa068163..a71144a06 100644 --- a/src/mol-repr/structure/representation/carbohydrate.ts +++ b/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' } \ No newline at end of file diff --git a/src/mol-repr/structure/representation/cartoon.ts b/src/mol-repr/structure/representation/cartoon.ts index f6fbff786..ff3859fc6 100644 --- a/src/mol-repr/structure/representation/cartoon.ts +++ b/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' } \ No newline at end of file diff --git a/src/mol-repr/structure/representation/molecular-surface.ts b/src/mol-repr/structure/representation/molecular-surface.ts index 4181217d3..6f35710d5 100644 --- a/src/mol-repr/structure/representation/molecular-surface.ts +++ b/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' } \ No newline at end of file diff --git a/src/mol-repr/volume/direct-volume.ts b/src/mol-repr/volume/direct-volume.ts index 306f7cf46..3a701a012 100644 --- a/src/mol-repr/volume/direct-volume.ts +++ b/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' } \ No newline at end of file diff --git a/src/mol-repr/volume/isosurface-mesh.ts b/src/mol-repr/volume/isosurface-mesh.ts index 135f5d291..89017927c 100644 --- a/src/mol-repr/volume/isosurface-mesh.ts +++ b/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' } \ No newline at end of file -- GitLab