UNPKG

molstar

Version:

A comprehensive macromolecular library.

35 lines (34 loc) 1.63 kB
"use strict"; /** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamlinesProvider = exports.StreamlinesParams = void 0; const param_definition_1 = require("../../mol-util/param-definition.js"); const custom_property_1 = require("../../mol-model/custom-property.js"); const custom_volume_property_1 = require("../common/custom-volume-property.js"); const volume_1 = require("../../mol-model/volume/volume.js"); const basic_1 = require("./streamlines/basic.js"); exports.StreamlinesParams = { type: param_definition_1.ParamDefinition.MappedStatic('basic', { 'basic': param_definition_1.ParamDefinition.Group(basic_1.BasicStreamlineCalculationParams, { isFlat: true }), }) }; exports.StreamlinesProvider = custom_volume_property_1.CustomVolumeProperty.createProvider({ label: 'Streamlines', descriptor: (0, custom_property_1.CustomPropertyDescriptor)({ name: 'molstar_streamlines', // TODO `cifExport` and `symbol` }), defaultParams: exports.StreamlinesParams, getParams: (data) => exports.StreamlinesParams, isApplicable: (data) => !volume_1.Volume.Segmentation.get(data), obtain: async (ctx, data, props) => { const p = { ...param_definition_1.ParamDefinition.getDefaultValues(exports.StreamlinesParams), ...props }; switch (p.type.name) { case 'basic': return { value: await (0, basic_1.calculateBasicStreamlines)(ctx, data, p.type.params) }; } } });