common.ts 962 B

1234567891011121314151617181920212223
  1. /**
  2. * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. * @author David Sehnal <david.sehnal@gmail.com>
  6. */
  7. import { ParamDefinition as PD } from '../../../mol-util/param-definition';
  8. import { ColorNames } from '../../../mol-util/color/names';
  9. import { Text } from '../../../mol-geo/geometry/text/text';
  10. export const MeasurementRepresentationCommonTextParams = {
  11. customText: PD.Text('', { label: 'Text', description: 'Override the label with custom value.' }),
  12. textColor: PD.Color(ColorNames.black, { isEssential: true }),
  13. textSize: PD.Numeric(0.5, { min: 0.1, max: 5, step: 0.1 }, { isEssential: true }),
  14. };
  15. export const LociLabelTextParams = {
  16. ...Text.Params,
  17. ...MeasurementRepresentationCommonTextParams,
  18. borderWidth: PD.Numeric(0.2, { min: 0, max: 0.5, step: 0.01 })
  19. };
  20. export type LociLabelTextParams = typeof LociLabelTextParams