Skip to content
Snippets Groups Projects
Commit 958bbb79 authored by David Sehnal's avatar David Sehnal
Browse files

mol-geo: removed Structure param

parent 0e5ed275
No related branches found
No related tags found
No related merge requests found
...@@ -15,8 +15,7 @@ import { LocationIterator } from '../util/location-iterator'; ...@@ -15,8 +15,7 @@ import { LocationIterator } from '../util/location-iterator';
import { ColorType } from './color-data'; import { ColorType } from './color-data';
import { SizeType } from './size-data'; import { SizeType } from './size-data';
import { Lines } from './lines/lines'; import { Lines } from './lines/lines';
import { paramDefaultValues, RangeParam, BooleanParam, SelectParam, ColorParam, StructureParam, ValueParam } from 'mol-util/parameter' import { paramDefaultValues, RangeParam, BooleanParam, SelectParam, ColorParam, ValueParam } from 'mol-util/parameter'
import { Structure } from 'mol-model/structure';
import { DirectVolume } from './direct-volume/direct-volume'; import { DirectVolume } from './direct-volume/direct-volume';
import { Context } from 'mol-gl/webgl/context'; import { Context } from 'mol-gl/webgl/context';
...@@ -68,7 +67,6 @@ export namespace Geometry { ...@@ -68,7 +67,6 @@ export namespace Geometry {
quality: SelectParam<VisualQuality>('Quality', '', 'auto', VisualQualityOptions), quality: SelectParam<VisualQuality>('Quality', '', 'auto', VisualQualityOptions),
colorTheme: SelectParam<ColorThemeName>('Color Theme', '', 'uniform', ColorThemeOptions), colorTheme: SelectParam<ColorThemeName>('Color Theme', '', 'uniform', ColorThemeOptions),
colorValue: ColorParam('Color Value', '', Color(0xCCCCCC)), colorValue: ColorParam('Color Value', '', Color(0xCCCCCC)),
structure: StructureParam('Structure', '', Structure.Empty),
webgl: ValueParam('WebGL Context', '', undefined as Context | undefined), webgl: ValueParam('WebGL Context', '', undefined as Context | undefined),
} }
export const DefaultProps = paramDefaultValues(Params) export const DefaultProps = paramDefaultValues(Params)
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
* @author Alexander Rose <alexander.rose@weirdbyte.de> * @author Alexander Rose <alexander.rose@weirdbyte.de>
*/ */
import { Color } from 'mol-util/color'; import { Color } from './color';
import { Structure } from 'mol-model/structure';
export interface BaseParam<T> { export interface BaseParam<T> {
label: string label: string
...@@ -81,15 +80,7 @@ export function NumberParam(label: string, description: string, defaultValue: nu ...@@ -81,15 +80,7 @@ export function NumberParam(label: string, description: string, defaultValue: nu
return { type: 'number', label, description, defaultValue, min, max, step } return { type: 'number', label, description, defaultValue, min, max, step }
} }
export interface StructureParam extends BaseParam<Structure> { export type Param = ValueParam<any> | SelectParam<any> | MultiSelectParam<any> | BooleanParam | RangeParam | TextParam | ColorParam | NumberParam
type: 'structure'
}
export function StructureParam(label: string, description: string, defaultValue: Structure): StructureParam {
return { type: 'structure', label, description, defaultValue }
}
export type Param = ValueParam<any> | SelectParam<any> | MultiSelectParam<any> | BooleanParam | RangeParam | TextParam | ColorParam | NumberParam | StructureParam
export type Params = { [k: string]: Param } export type Params = { [k: string]: Param }
export function paramDefaultValues<T extends Params>(params: T) { export function paramDefaultValues<T extends Params>(params: T) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment