UNPKG

molstar

Version:

A comprehensive macromolecular library.

38 lines 1.4 kB
/** * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { Color } from '../../mol-util/color'; import { ParamDefinition as PD } from '../../mol-util/param-definition'; import { TableLegend } from '../../mol-util/legend'; import { defaults } from '../../mol-util'; var DefaultColor = Color(0xCCCCCC); var Description = 'Gives everything the same, uniform color.'; export var UniformColorThemeParams = { value: PD.Color(DefaultColor), }; export function getUniformColorThemeParams(ctx) { return UniformColorThemeParams; // TODO return copy } export function UniformColorTheme(ctx, props) { var color = defaults(props.value, DefaultColor); return { factory: UniformColorTheme, granularity: 'uniform', color: function () { return color; }, props: props, description: Description, legend: TableLegend([['uniform', color]]) }; } export var UniformColorThemeProvider = { name: 'uniform', label: 'Uniform', category: "Miscellaneous" /* Misc */, factory: UniformColorTheme, getParams: getUniformColorThemeParams, defaultValues: PD.getDefaultValues(UniformColorThemeParams), isApplicable: function (ctx) { return true; } }; //# sourceMappingURL=uniform.js.map