From 958bbb79b40f88e78f3258fb7d9e5a3b6d5051a8 Mon Sep 17 00:00:00 2001 From: David Sehnal <david.sehnal@gmail.com> Date: Mon, 29 Oct 2018 15:56:07 +0100 Subject: [PATCH] mol-geo: removed Structure param --- src/mol-geo/geometry/geometry.ts | 4 +--- src/mol-util/parameter.ts | 13 ++----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/mol-geo/geometry/geometry.ts b/src/mol-geo/geometry/geometry.ts index 86f4ba51b..dcabc0353 100644 --- a/src/mol-geo/geometry/geometry.ts +++ b/src/mol-geo/geometry/geometry.ts @@ -15,8 +15,7 @@ import { LocationIterator } from '../util/location-iterator'; import { ColorType } from './color-data'; import { SizeType } from './size-data'; import { Lines } from './lines/lines'; -import { paramDefaultValues, RangeParam, BooleanParam, SelectParam, ColorParam, StructureParam, ValueParam } from 'mol-util/parameter' -import { Structure } from 'mol-model/structure'; +import { paramDefaultValues, RangeParam, BooleanParam, SelectParam, ColorParam, ValueParam } from 'mol-util/parameter' import { DirectVolume } from './direct-volume/direct-volume'; import { Context } from 'mol-gl/webgl/context'; @@ -68,7 +67,6 @@ export namespace Geometry { quality: SelectParam<VisualQuality>('Quality', '', 'auto', VisualQualityOptions), colorTheme: SelectParam<ColorThemeName>('Color Theme', '', 'uniform', ColorThemeOptions), colorValue: ColorParam('Color Value', '', Color(0xCCCCCC)), - structure: StructureParam('Structure', '', Structure.Empty), webgl: ValueParam('WebGL Context', '', undefined as Context | undefined), } export const DefaultProps = paramDefaultValues(Params) diff --git a/src/mol-util/parameter.ts b/src/mol-util/parameter.ts index 2110b3db3..5cfe46499 100644 --- a/src/mol-util/parameter.ts +++ b/src/mol-util/parameter.ts @@ -4,8 +4,7 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { Color } from 'mol-util/color'; -import { Structure } from 'mol-model/structure'; +import { Color } from './color'; export interface BaseParam<T> { label: string @@ -81,15 +80,7 @@ export function NumberParam(label: string, description: string, defaultValue: nu return { type: 'number', label, description, defaultValue, min, max, step } } -export interface StructureParam extends BaseParam<Structure> { - 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 Param = ValueParam<any> | SelectParam<any> | MultiSelectParam<any> | BooleanParam | RangeParam | TextParam | ColorParam | NumberParam export type Params = { [k: string]: Param } export function paramDefaultValues<T extends Params>(params: T) { -- GitLab