molstar 3.44.0 → 3.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/cli/cifschema/index.js +2 -2
- package/lib/commonjs/cli/cifschema/index.js +2 -2
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/anvil/representation.d.ts +4 -4
- package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
- package/lib/commonjs/extensions/dnatco/ntc-tube/representation.d.ts +3 -3
- package/lib/commonjs/extensions/mvs/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/behavior.js +3 -1
- package/lib/commonjs/extensions/mvs/components/annotation-color-theme.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/components/annotation-color-theme.js +3 -2
- package/lib/commonjs/extensions/mvs/components/annotation-label/representation.d.ts +3 -1
- package/lib/commonjs/extensions/mvs/components/annotation-label/representation.js +3 -2
- package/lib/commonjs/extensions/mvs/components/annotation-prop.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/components/annotation-prop.js +2 -2
- package/lib/commonjs/extensions/mvs/components/custom-label/representation.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/components/custom-label/representation.js +4 -3
- package/lib/commonjs/extensions/mvs/components/custom-tooltips-prop.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/components/custom-tooltips-prop.js +2 -2
- package/lib/commonjs/extensions/mvs/components/is-mvs-model-prop.d.ts +21 -0
- package/lib/commonjs/extensions/mvs/components/is-mvs-model-prop.js +40 -0
- package/lib/commonjs/extensions/mvs/components/multilayer-color-theme.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/components/multilayer-color-theme.js +4 -3
- package/lib/commonjs/extensions/mvs/load.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/load.js +5 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +160 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +10 -5
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/color-data.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/color-data.js +15 -8
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders-builder.d.ts +9 -3
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders-builder.js +13 -6
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +11 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +14 -9
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
- package/lib/commonjs/mol-geo/util/location-iterator.d.ts +4 -1
- package/lib/commonjs/mol-geo/util/location-iterator.js +8 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +2 -0
- package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.vert.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.vert.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -2
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +2 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +2 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +6 -3
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +8 -4
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +12 -6
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +9 -7
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +16 -10
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +2 -3
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +48 -12
- package/lib/commonjs/mol-plugin-ui/controls.d.ts +2 -2
- package/lib/commonjs/mol-plugin-ui/controls.js +7 -2
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +4 -1
- package/lib/commonjs/mol-repr/shape/loci/label.js +16 -9
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +7 -5
- package/lib/commonjs/mol-repr/structure/complex-visual.js +3 -2
- package/lib/commonjs/mol-repr/structure/params.d.ts +5 -4
- package/lib/commonjs/mol-repr/structure/registry.d.ts +15 -10
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -3
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +7 -5
- package/lib/commonjs/mol-repr/structure/units-visual.js +3 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +5 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +8 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +5 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +8 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +2 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +2 -1
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +4 -2
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-bond.js +27 -26
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +4 -2
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.js +4 -4
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +9 -2
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +28 -2
- package/lib/commonjs/mol-repr/structure/visual/util/link.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/util/link.js +16 -13
- package/lib/commonjs/mol-repr/structure/visual/util/polymer.d.ts +3 -1
- package/lib/commonjs/mol-repr/structure/visual/util/polymer.js +2 -2
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -5
- package/lib/commonjs/mol-repr/volume/registry.d.ts +2 -2
- package/lib/commonjs/mol-repr/volume/segment.d.ts +5 -5
- package/lib/commonjs/mol-util/param-definition.d.ts +9 -2
- package/lib/commonjs/mol-util/param-definition.js +2 -2
- package/lib/extensions/anvil/behavior.d.ts +1 -1
- package/lib/extensions/anvil/representation.d.ts +4 -4
- package/lib/extensions/cellpack/representation.d.ts +1 -1
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
- package/lib/extensions/dnatco/ntc-tube/representation.d.ts +3 -3
- package/lib/extensions/mvs/behavior.d.ts +1 -1
- package/lib/extensions/mvs/behavior.js +3 -1
- package/lib/extensions/mvs/components/annotation-color-theme.d.ts +1 -1
- package/lib/extensions/mvs/components/annotation-color-theme.js +3 -2
- package/lib/extensions/mvs/components/annotation-label/representation.d.ts +3 -1
- package/lib/extensions/mvs/components/annotation-label/representation.js +3 -2
- package/lib/extensions/mvs/components/annotation-prop.d.ts +1 -1
- package/lib/extensions/mvs/components/annotation-prop.js +2 -2
- package/lib/extensions/mvs/components/custom-label/representation.d.ts +1 -1
- package/lib/extensions/mvs/components/custom-label/representation.js +4 -3
- package/lib/extensions/mvs/components/custom-tooltips-prop.d.ts +1 -1
- package/lib/extensions/mvs/components/custom-tooltips-prop.js +2 -2
- package/lib/extensions/mvs/components/is-mvs-model-prop.d.ts +21 -0
- package/lib/extensions/mvs/components/is-mvs-model-prop.js +35 -0
- package/lib/extensions/mvs/components/multilayer-color-theme.d.ts +1 -1
- package/lib/extensions/mvs/components/multilayer-color-theme.js +4 -3
- package/lib/extensions/mvs/load.d.ts +1 -1
- package/lib/extensions/mvs/load.js +5 -2
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
- package/lib/extensions/rcsb/graphql/types.d.ts +160 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +10 -5
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/mol-geo/geometry/color-data.d.ts +1 -0
- package/lib/mol-geo/geometry/color-data.js +15 -8
- package/lib/mol-geo/geometry/cylinders/cylinders-builder.d.ts +9 -3
- package/lib/mol-geo/geometry/cylinders/cylinders-builder.js +13 -6
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +11 -2
- package/lib/mol-geo/geometry/cylinders/cylinders.js +14 -9
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +1 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
- package/lib/mol-geo/util/location-iterator.d.ts +4 -1
- package/lib/mol-geo/util/location-iterator.js +8 -1
- package/lib/mol-gl/renderable/cylinders.d.ts +2 -0
- package/lib/mol-gl/renderable/cylinders.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/mol-gl/shader/cylinders.vert.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.vert.js +2 -2
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
- package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/mol-model-formats/shape/ply.d.ts +2 -2
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +2 -1
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +2 -1
- package/lib/mol-model-props/computed/representations/interactions.d.ts +6 -3
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +8 -4
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.js +12 -6
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/transforms/representation.d.ts +9 -7
- package/lib/mol-plugin-state/transforms/representation.js +16 -10
- package/lib/mol-plugin-ui/controls/parameters.d.ts +2 -3
- package/lib/mol-plugin-ui/controls/parameters.js +48 -12
- package/lib/mol-plugin-ui/controls.d.ts +2 -2
- package/lib/mol-plugin-ui/controls.js +7 -2
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +14 -3
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +9 -3
- package/lib/mol-repr/shape/loci/angle.d.ts +1 -1
- package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -1
- package/lib/mol-repr/shape/loci/label.d.ts +4 -1
- package/lib/mol-repr/shape/loci/label.js +16 -9
- package/lib/mol-repr/shape/loci/orientation.d.ts +1 -1
- package/lib/mol-repr/shape/loci/plane.d.ts +1 -1
- package/lib/mol-repr/shape/model/unitcell.d.ts +1 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +7 -5
- package/lib/mol-repr/structure/complex-visual.js +3 -2
- package/lib/mol-repr/structure/params.d.ts +5 -4
- package/lib/mol-repr/structure/registry.d.ts +15 -10
- package/lib/mol-repr/structure/representation/backbone.d.ts +6 -3
- package/lib/mol-repr/structure/representation/backbone.js +1 -1
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +6 -3
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +6 -3
- package/lib/mol-repr/structure/representation/cartoon.d.ts +6 -3
- package/lib/mol-repr/structure/representation/cartoon.js +1 -1
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +6 -3
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
- package/lib/mol-repr/structure/representation/orientation.d.ts +3 -3
- package/lib/mol-repr/structure/representation/putty.d.ts +3 -3
- package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -3
- package/lib/mol-repr/structure/units-visual.d.ts +7 -5
- package/lib/mol-repr/structure/units-visual.js +3 -2
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +5 -2
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +8 -2
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +1 -1
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +5 -2
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +8 -2
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +2 -1
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +2 -1
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -4
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +4 -2
- package/lib/mol-repr/structure/visual/nucleotide-atomic-bond.js +27 -26
- package/lib/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -2
- package/lib/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +4 -2
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.js +4 -4
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.js +2 -2
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/util/bond.d.ts +9 -2
- package/lib/mol-repr/structure/visual/util/bond.js +28 -2
- package/lib/mol-repr/structure/visual/util/link.d.ts +2 -0
- package/lib/mol-repr/structure/visual/util/link.js +16 -13
- package/lib/mol-repr/structure/visual/util/polymer.d.ts +3 -1
- package/lib/mol-repr/structure/visual/util/polymer.js +2 -2
- package/lib/mol-repr/volume/isosurface.d.ts +5 -5
- package/lib/mol-repr/volume/registry.d.ts +2 -2
- package/lib/mol-repr/volume/segment.d.ts +5 -5
- package/lib/mol-util/param-definition.d.ts +9 -2
- package/lib/mol-util/param-definition.js +2 -2
- package/package.json +33 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -156,7 +156,7 @@ declare const ModelUnitcell3D: StateTransformer<SO.Molecule.Model, SO.Shape.Repr
|
|
|
156
156
|
flatShaded: boolean;
|
|
157
157
|
ignoreLight: boolean;
|
|
158
158
|
xrayShaded: boolean | "inverted";
|
|
159
|
-
transparentBackfaces:
|
|
159
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
160
160
|
bumpFrequency: number;
|
|
161
161
|
bumpAmplitude: number;
|
|
162
162
|
alpha: number;
|
|
@@ -180,7 +180,7 @@ declare const StructureBoundingBox3D: StateTransformer<SO.Molecule.Structure, SO
|
|
|
180
180
|
flatShaded: boolean;
|
|
181
181
|
ignoreLight: boolean;
|
|
182
182
|
xrayShaded: boolean | "inverted";
|
|
183
|
-
transparentBackfaces:
|
|
183
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
184
184
|
bumpFrequency: number;
|
|
185
185
|
bumpAmplitude: number;
|
|
186
186
|
alpha: number;
|
|
@@ -288,7 +288,7 @@ declare const StructureSelectionsAngle3D: StateTransformer<SO.Molecule.Structure
|
|
|
288
288
|
flipSided: boolean;
|
|
289
289
|
flatShaded: boolean;
|
|
290
290
|
xrayShaded: boolean | "inverted";
|
|
291
|
-
transparentBackfaces:
|
|
291
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
292
292
|
bumpFrequency: number;
|
|
293
293
|
bumpAmplitude: number;
|
|
294
294
|
lineSizeAttenuation: boolean;
|
|
@@ -341,7 +341,7 @@ declare const StructureSelectionsDihedral3D: StateTransformer<SO.Molecule.Struct
|
|
|
341
341
|
flipSided: boolean;
|
|
342
342
|
flatShaded: boolean;
|
|
343
343
|
xrayShaded: boolean | "inverted";
|
|
344
|
-
transparentBackfaces:
|
|
344
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
345
345
|
bumpFrequency: number;
|
|
346
346
|
bumpAmplitude: number;
|
|
347
347
|
lineSizeAttenuation: boolean;
|
|
@@ -353,6 +353,8 @@ type StructureSelectionsLabel3D = typeof StructureSelectionsLabel3D;
|
|
|
353
353
|
declare const StructureSelectionsLabel3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
|
|
354
354
|
scaleByRadius: boolean;
|
|
355
355
|
visuals: "text"[];
|
|
356
|
+
snapshotKey: string;
|
|
357
|
+
tooltip: string;
|
|
356
358
|
borderWidth: number;
|
|
357
359
|
customText: string;
|
|
358
360
|
textColor: Color;
|
|
@@ -400,7 +402,7 @@ declare const StructureSelectionsOrientation3D: StateTransformer<SO.Molecule.Str
|
|
|
400
402
|
flatShaded: boolean;
|
|
401
403
|
ignoreLight: boolean;
|
|
402
404
|
xrayShaded: boolean | "inverted";
|
|
403
|
-
transparentBackfaces:
|
|
405
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
404
406
|
bumpFrequency: number;
|
|
405
407
|
bumpAmplitude: number;
|
|
406
408
|
alpha: number;
|
|
@@ -427,7 +429,7 @@ declare const StructureSelectionsPlane3D: StateTransformer<SO.Molecule.Structure
|
|
|
427
429
|
flatShaded: boolean;
|
|
428
430
|
ignoreLight: boolean;
|
|
429
431
|
xrayShaded: boolean | "inverted";
|
|
430
|
-
transparentBackfaces:
|
|
432
|
+
transparentBackfaces: "on" | "off" | "opaque";
|
|
431
433
|
bumpFrequency: number;
|
|
432
434
|
bumpAmplitude: number;
|
|
433
435
|
alpha: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018-
|
|
3
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -41,6 +41,7 @@ var plane_1 = require("../../mol-repr/shape/loci/plane");
|
|
|
41
41
|
var substance_1 = require("../../mol-theme/substance");
|
|
42
42
|
var material_1 = require("../../mol-util/material");
|
|
43
43
|
var interpolate_1 = require("../../mol-math/interpolate");
|
|
44
|
+
var marker_action_1 = require("../../mol-util/marker-action");
|
|
44
45
|
var StructureRepresentation3D = objects_1.PluginStateTransform.BuiltIn({
|
|
45
46
|
name: 'structure-representation-3d',
|
|
46
47
|
display: '3D Representation',
|
|
@@ -1245,16 +1246,18 @@ var StructureSelectionsLabel3D = objects_1.PluginStateTransform.BuiltIn({
|
|
|
1245
1246
|
var _this = this;
|
|
1246
1247
|
var a = _a.a, params = _a.params;
|
|
1247
1248
|
return mol_task_1.Task.create('Structure Label', function (ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
1248
|
-
var data, repr;
|
|
1249
|
-
var _a;
|
|
1250
|
-
return tslib_1.__generator(this, function (
|
|
1251
|
-
switch (
|
|
1249
|
+
var data, repr, pickable;
|
|
1250
|
+
var _a, _b, _c;
|
|
1251
|
+
return tslib_1.__generator(this, function (_d) {
|
|
1252
|
+
switch (_d.label) {
|
|
1252
1253
|
case 0:
|
|
1253
1254
|
data = (0, helpers_2.getLabelDataFromStructureSelections)(a.data);
|
|
1254
1255
|
repr = (0, label_1.LabelRepresentation)(tslib_1.__assign({ webgl: (_a = plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.webgl }, plugin.representation.structure.themes), function () { return label_1.LabelParams; });
|
|
1255
1256
|
return [4 /*yield*/, repr.createOrUpdate(params, data).runInContext(ctx)];
|
|
1256
1257
|
case 1:
|
|
1257
|
-
|
|
1258
|
+
_d.sent();
|
|
1259
|
+
pickable = !!(((_b = params.snapshotKey) === null || _b === void 0 ? void 0 : _b.trim()) || ((_c = params.tooltip) === null || _c === void 0 ? void 0 : _c.trim()));
|
|
1260
|
+
repr.setState({ pickable: pickable, markerActions: pickable ? marker_action_1.MarkerActions.Highlighting : marker_action_1.MarkerAction.None });
|
|
1258
1261
|
return [2 /*return*/, new objects_1.PluginStateObject.Shape.Representation3D({ repr: repr, sourceData: data }, { label: "Label" })];
|
|
1259
1262
|
}
|
|
1260
1263
|
});
|
|
@@ -1264,16 +1267,19 @@ var StructureSelectionsLabel3D = objects_1.PluginStateTransform.BuiltIn({
|
|
|
1264
1267
|
var _this = this;
|
|
1265
1268
|
var a = _a.a, b = _a.b, oldParams = _a.oldParams, newParams = _a.newParams;
|
|
1266
1269
|
return mol_task_1.Task.create('Structure Label', function (ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
1267
|
-
var props, data;
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
+
var props, data, pickable;
|
|
1271
|
+
var _a, _b;
|
|
1272
|
+
return tslib_1.__generator(this, function (_c) {
|
|
1273
|
+
switch (_c.label) {
|
|
1270
1274
|
case 0:
|
|
1271
1275
|
props = tslib_1.__assign(tslib_1.__assign({}, b.data.repr.props), newParams);
|
|
1272
1276
|
data = (0, helpers_2.getLabelDataFromStructureSelections)(a.data);
|
|
1273
1277
|
return [4 /*yield*/, b.data.repr.createOrUpdate(props, data).runInContext(ctx)];
|
|
1274
1278
|
case 1:
|
|
1275
|
-
|
|
1279
|
+
_c.sent();
|
|
1276
1280
|
b.data.sourceData = data;
|
|
1281
|
+
pickable = !!(((_a = newParams.snapshotKey) === null || _a === void 0 ? void 0 : _a.trim()) || ((_b = newParams.tooltip) === null || _b === void 0 ? void 0 : _b.trim()));
|
|
1282
|
+
b.data.repr.setState({ pickable: pickable, markerActions: pickable ? marker_action_1.MarkerActions.Highlighting : marker_action_1.MarkerAction.None });
|
|
1277
1283
|
return [2 /*return*/, mol_state_1.StateTransformer.UpdateResult.Updated];
|
|
1278
1284
|
}
|
|
1279
1285
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -123,8 +123,7 @@ export declare class NumberRangeControl extends SimpleParam<PD.Numeric> {
|
|
|
123
123
|
renderControl(): import("react/jsx-runtime").JSX.Element;
|
|
124
124
|
}
|
|
125
125
|
export declare class TextControl extends SimpleParam<PD.Text> {
|
|
126
|
-
|
|
127
|
-
onKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
126
|
+
updateValue: (value: string) => void;
|
|
128
127
|
renderControl(): import("react/jsx-runtime").JSX.Element;
|
|
129
128
|
}
|
|
130
129
|
export declare class PureSelectControl extends React.PureComponent<ParamProps<PD.Select<string | number>> & {
|
|
@@ -4,7 +4,7 @@ exports.ScriptControl = exports.ConvertedControl = exports.ConditionedControl =
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/**
|
|
7
|
-
* Copyright (c) 2018-
|
|
7
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
8
8
|
*
|
|
9
9
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
10
10
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -227,6 +227,8 @@ function renderSimple(options) {
|
|
|
227
227
|
_className.push('msp-control-label-short');
|
|
228
228
|
if (props.param.twoColumns)
|
|
229
229
|
_className.push('msp-control-col-2');
|
|
230
|
+
if (props.param.multiline)
|
|
231
|
+
_className.push('msp-control-twoline');
|
|
230
232
|
var className = _className.join(' ');
|
|
231
233
|
var label = props.param.label || (0, string_1.camelCaseToWords)(props.name);
|
|
232
234
|
var help = props.param.help
|
|
@@ -370,28 +372,62 @@ var TextControl = /** @class */ (function (_super) {
|
|
|
370
372
|
tslib_1.__extends(TextControl, _super);
|
|
371
373
|
function TextControl() {
|
|
372
374
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
373
|
-
_this.
|
|
374
|
-
var value = e.target.value;
|
|
375
|
+
_this.updateValue = function (value) {
|
|
375
376
|
if (value !== _this.props.value) {
|
|
376
377
|
_this.update(value);
|
|
377
378
|
}
|
|
378
379
|
};
|
|
379
|
-
_this.onKeyPress = function (e) {
|
|
380
|
-
if ((e.keyCode === 13 || e.charCode === 13 || e.key === 'Enter')) {
|
|
381
|
-
if (_this.props.onEnter)
|
|
382
|
-
_this.props.onEnter();
|
|
383
|
-
}
|
|
384
|
-
e.stopPropagation();
|
|
385
|
-
};
|
|
386
380
|
return _this;
|
|
387
381
|
}
|
|
388
382
|
TextControl.prototype.renderControl = function () {
|
|
389
|
-
var placeholder = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
390
|
-
return (0, jsx_runtime_1.jsx)(
|
|
383
|
+
var placeholder = this.props.param.placeholder || this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
384
|
+
return (0, jsx_runtime_1.jsx)(TextCtrl, { props: this.props, placeholder: placeholder, update: this.updateValue });
|
|
391
385
|
};
|
|
392
386
|
return TextControl;
|
|
393
387
|
}(SimpleParam));
|
|
394
388
|
exports.TextControl = TextControl;
|
|
389
|
+
function TextCtrl(_a) {
|
|
390
|
+
var props = _a.props, placeholder = _a.placeholder, update = _a.update;
|
|
391
|
+
var _b = React.useState(props.value), value = _b[0], setValue = _b[1];
|
|
392
|
+
React.useEffect(function () { return setValue(props.value); }, [props.value]);
|
|
393
|
+
if (props.param.multiline) {
|
|
394
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'msp-control-text-area-wrapper', children: (0, jsx_runtime_1.jsx)("textarea", { value: props.param.disableInteractiveUpdates ? (value || '') : props.value, placeholder: placeholder, onChange: function (e) {
|
|
395
|
+
if (props.param.disableInteractiveUpdates)
|
|
396
|
+
setValue(e.target.value);
|
|
397
|
+
else
|
|
398
|
+
update(e.target.value);
|
|
399
|
+
}, onBlur: function (e) {
|
|
400
|
+
if (props.param.disableInteractiveUpdates)
|
|
401
|
+
update(e.target.value);
|
|
402
|
+
}, onKeyDown: function (e) {
|
|
403
|
+
if (e.key === 'Enter' && (e.shiftKey || e.ctrlKey || e.metaKey)) {
|
|
404
|
+
e.currentTarget.blur();
|
|
405
|
+
}
|
|
406
|
+
}, disabled: props.isDisabled }) });
|
|
407
|
+
}
|
|
408
|
+
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: props.param.disableInteractiveUpdates ? (value || '') : props.value, placeholder: placeholder, onChange: function (e) {
|
|
409
|
+
if (props.param.disableInteractiveUpdates)
|
|
410
|
+
setValue(e.target.value);
|
|
411
|
+
else
|
|
412
|
+
update(e.target.value);
|
|
413
|
+
}, onBlur: function (e) {
|
|
414
|
+
if (props.param.disableInteractiveUpdates)
|
|
415
|
+
update(e.target.value);
|
|
416
|
+
}, disabled: props.isDisabled, onKeyDown: function (e) {
|
|
417
|
+
if (e.key !== 'Enter')
|
|
418
|
+
return;
|
|
419
|
+
if (props.onEnter) {
|
|
420
|
+
e.stopPropagation();
|
|
421
|
+
props.onEnter();
|
|
422
|
+
}
|
|
423
|
+
else if (e.key === 'Enter' && (e.shiftKey || e.ctrlKey || e.metaKey)) {
|
|
424
|
+
e.currentTarget.blur();
|
|
425
|
+
}
|
|
426
|
+
else if (props.param.disableInteractiveUpdates) {
|
|
427
|
+
update(value);
|
|
428
|
+
}
|
|
429
|
+
} });
|
|
430
|
+
}
|
|
395
431
|
var PureSelectControl = /** @class */ (function (_super) {
|
|
396
432
|
tslib_1.__extends(PureSelectControl, _super);
|
|
397
433
|
function PureSelectControl() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -68,7 +68,7 @@ export declare class LociLabels extends PluginUIComponent<{}, {
|
|
|
68
68
|
labels: ReadonlyArray<LociLabel>;
|
|
69
69
|
}> {
|
|
70
70
|
state: {
|
|
71
|
-
labels:
|
|
71
|
+
labels: string[];
|
|
72
72
|
};
|
|
73
73
|
componentDidMount(): void;
|
|
74
74
|
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ exports.DefaultStructureTools = exports.CustomStructureControls = exports.LociLa
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/**
|
|
7
|
-
* Copyright (c) 2018-
|
|
7
|
+
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
8
8
|
*
|
|
9
9
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
10
10
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -296,7 +296,12 @@ var LociLabels = /** @class */ (function (_super) {
|
|
|
296
296
|
if (this.state.labels.length === 0) {
|
|
297
297
|
return null;
|
|
298
298
|
}
|
|
299
|
-
return (0, jsx_runtime_1.jsx)("div", { className: 'msp-highlight-info', children: this.state.labels.map(function (e, i) {
|
|
299
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'msp-highlight-info', children: this.state.labels.map(function (e, i) {
|
|
300
|
+
if (e.indexOf('\n') > 0) {
|
|
301
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'msp-highlight-markdown-row', children: (0, jsx_runtime_1.jsx)(react_markdown_1.default, { skipHtml: true, children: e }) }, '' + i);
|
|
302
|
+
}
|
|
303
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'msp-highlight-simple-row', dangerouslySetInnerHTML: { __html: e } }, '' + i);
|
|
304
|
+
}) });
|
|
300
305
|
};
|
|
301
306
|
return LociLabels;
|
|
302
307
|
}(base_1.PluginUIComponent));
|
|
@@ -59,7 +59,7 @@ export declare const AngleParams: {
|
|
|
59
59
|
flipSided: PD.BooleanParam;
|
|
60
60
|
flatShaded: PD.BooleanParam;
|
|
61
61
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
62
|
-
transparentBackfaces: PD.Select<
|
|
62
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
63
63
|
bumpFrequency: PD.Numeric;
|
|
64
64
|
bumpAmplitude: PD.Numeric;
|
|
65
65
|
lineSizeAttenuation: PD.BooleanParam;
|
|
@@ -59,7 +59,7 @@ export declare const DihedralParams: {
|
|
|
59
59
|
flipSided: PD.BooleanParam;
|
|
60
60
|
flatShaded: PD.BooleanParam;
|
|
61
61
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
62
|
-
transparentBackfaces: PD.Select<
|
|
62
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
63
63
|
bumpFrequency: PD.Numeric;
|
|
64
64
|
bumpAmplitude: PD.Numeric;
|
|
65
65
|
lineSizeAttenuation: PD.BooleanParam;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2019-24 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
6
|
*/
|
|
6
7
|
import { Loci } from '../../../mol-model/loci';
|
|
7
8
|
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
@@ -15,6 +16,8 @@ export interface LabelData {
|
|
|
15
16
|
export declare const LabelParams: {
|
|
16
17
|
scaleByRadius: PD.BooleanParam;
|
|
17
18
|
visuals: PD.MultiSelect<"text">;
|
|
19
|
+
snapshotKey: PD.Text<string>;
|
|
20
|
+
tooltip: PD.Text<string>;
|
|
18
21
|
borderWidth: PD.Numeric;
|
|
19
22
|
customText: PD.Text<string>;
|
|
20
23
|
textColor: PD.Color;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2019-24 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.LabelRepresentation = exports.LabelParams = void 0;
|
|
@@ -19,9 +20,9 @@ var label_1 = require("../../../mol-theme/label");
|
|
|
19
20
|
var common_1 = require("./common");
|
|
20
21
|
var TextParams = tslib_1.__assign({}, common_1.LociLabelTextParams);
|
|
21
22
|
var LabelVisuals = {
|
|
22
|
-
'text': function (ctx, getParams) { return (0, representation_1.ShapeRepresentation)(getTextShape, text_1.Text.Utils
|
|
23
|
+
'text': function (ctx, getParams) { return (0, representation_1.ShapeRepresentation)(getTextShape, text_1.Text.Utils); },
|
|
23
24
|
};
|
|
24
|
-
exports.LabelParams = tslib_1.__assign(tslib_1.__assign({}, TextParams), { scaleByRadius: param_definition_1.ParamDefinition.Boolean(true), visuals: param_definition_1.ParamDefinition.MultiSelect(['text'], param_definition_1.ParamDefinition.objectToOptions(LabelVisuals)) });
|
|
25
|
+
exports.LabelParams = tslib_1.__assign(tslib_1.__assign({}, TextParams), { scaleByRadius: param_definition_1.ParamDefinition.Boolean(true), visuals: param_definition_1.ParamDefinition.MultiSelect(['text'], param_definition_1.ParamDefinition.objectToOptions(LabelVisuals)), snapshotKey: param_definition_1.ParamDefinition.Text('', { isEssential: true, disableInteractiveUpdates: true, description: 'Activate the snapshot with the provided key when clicking on the label' }), tooltip: param_definition_1.ParamDefinition.Text('', { isEssential: true, multiline: true, disableInteractiveUpdates: true, placeholder: 'Tooltip', description: 'Tooltip text to be displayed when hovering over the label' }) });
|
|
25
26
|
//
|
|
26
27
|
var tmpSphere = (0, geometry_1.Sphere3D)();
|
|
27
28
|
function label(info, condensed) {
|
|
@@ -47,15 +48,21 @@ function buildText(data, props, text) {
|
|
|
47
48
|
return builder.getText();
|
|
48
49
|
}
|
|
49
50
|
function getTextShape(ctx, data, props, shape) {
|
|
51
|
+
var _a, _b;
|
|
50
52
|
var text = buildText(data, props, shape && shape.geometry);
|
|
51
53
|
var name = getLabelName(data);
|
|
54
|
+
var tooltip = (_b = (_a = props.tooltip) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
52
55
|
var customLabel = props.customText.trim();
|
|
53
|
-
var getLabel
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
var getLabel;
|
|
57
|
+
if (tooltip) {
|
|
58
|
+
getLabel = function (_) { return tooltip; };
|
|
59
|
+
}
|
|
60
|
+
else if (customLabel) {
|
|
61
|
+
getLabel = function (_) { return customLabel; };
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
getLabel = function (groupId) { return label(data.infos[groupId]); };
|
|
65
|
+
}
|
|
59
66
|
return shape_1.Shape.create(name, data, text, function () { return props.textColor; }, function () { return props.textSize; }, getLabel);
|
|
60
67
|
}
|
|
61
68
|
function LabelRepresentation(ctx, getParams) {
|
|
@@ -19,7 +19,7 @@ export declare const OrientationParams: {
|
|
|
19
19
|
flatShaded: PD.BooleanParam;
|
|
20
20
|
ignoreLight: PD.BooleanParam;
|
|
21
21
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
22
|
-
transparentBackfaces: PD.Select<
|
|
22
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
23
23
|
bumpFrequency: PD.Numeric;
|
|
24
24
|
bumpAmplitude: PD.Numeric;
|
|
25
25
|
alpha: PD.Numeric;
|
|
@@ -18,7 +18,7 @@ export declare const PlaneParams: {
|
|
|
18
18
|
flatShaded: PD.BooleanParam;
|
|
19
19
|
ignoreLight: PD.BooleanParam;
|
|
20
20
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
21
|
-
transparentBackfaces: PD.Select<
|
|
21
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
22
22
|
bumpFrequency: PD.Numeric;
|
|
23
23
|
bumpAmplitude: PD.Numeric;
|
|
24
24
|
alpha: PD.Numeric;
|
|
@@ -21,7 +21,7 @@ export declare const UnitcellParams: {
|
|
|
21
21
|
flatShaded: PD.BooleanParam;
|
|
22
22
|
ignoreLight: PD.BooleanParam;
|
|
23
23
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
24
|
-
transparentBackfaces: PD.Select<
|
|
24
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
25
25
|
bumpFrequency: PD.Numeric;
|
|
26
26
|
bumpAmplitude: PD.Numeric;
|
|
27
27
|
alpha: PD.Numeric;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2018-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
* @author Gianluca Tomasello <giagitom@gmail.com>
|
|
5
6
|
*/
|
|
6
7
|
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
7
8
|
import { Visual, VisualContext } from '../visual';
|
|
@@ -28,7 +29,7 @@ export interface ComplexVisual<P extends StructureParams> extends Visual<Structu
|
|
|
28
29
|
interface ComplexVisualBuilder<P extends StructureParams, G extends Geometry> {
|
|
29
30
|
defaultProps: PD.Values<P>;
|
|
30
31
|
createGeometry(ctx: VisualContext, structure: Structure, theme: Theme, props: PD.Values<P>, geometry?: G): Promise<G> | G;
|
|
31
|
-
createLocationIterator(structure: Structure): LocationIterator;
|
|
32
|
+
createLocationIterator(structure: Structure, props: PD.Values<P>): LocationIterator;
|
|
32
33
|
getLoci(pickingId: PickingId, structure: Structure, id: number): Loci;
|
|
33
34
|
eachLocation(loci: Loci, structure: Structure, apply: (interval: Interval) => boolean, isMarking: boolean): boolean;
|
|
34
35
|
setUpdateState(state: VisualUpdateState, newProps: PD.Values<P>, currentProps: PD.Values<P>, newTheme: Theme, currentTheme: Theme, newStructure: Structure, currentStructure: Structure): void;
|
|
@@ -48,7 +49,7 @@ export declare const ComplexMeshParams: {
|
|
|
48
49
|
flatShaded: PD.BooleanParam;
|
|
49
50
|
ignoreLight: PD.BooleanParam;
|
|
50
51
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
51
|
-
transparentBackfaces: PD.Select<
|
|
52
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
52
53
|
bumpFrequency: PD.Numeric;
|
|
53
54
|
bumpAmplitude: PD.Numeric;
|
|
54
55
|
alpha: PD.Numeric;
|
|
@@ -81,7 +82,7 @@ export declare const ComplexSpheresParams: {
|
|
|
81
82
|
doubleSided: PD.BooleanParam;
|
|
82
83
|
ignoreLight: PD.BooleanParam;
|
|
83
84
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
84
|
-
transparentBackfaces: PD.Select<
|
|
85
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
85
86
|
solidInterior: PD.BooleanParam;
|
|
86
87
|
clipPrimitive: PD.BooleanParam;
|
|
87
88
|
approximate: PD.BooleanParam;
|
|
@@ -119,10 +120,11 @@ export declare const ComplexCylindersParams: {
|
|
|
119
120
|
doubleSided: PD.BooleanParam;
|
|
120
121
|
ignoreLight: PD.BooleanParam;
|
|
121
122
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
122
|
-
transparentBackfaces: PD.Select<
|
|
123
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
123
124
|
solidInterior: PD.BooleanParam;
|
|
124
125
|
bumpFrequency: PD.Numeric;
|
|
125
126
|
bumpAmplitude: PD.Numeric;
|
|
127
|
+
colorMode: PD.Select<"default" | "interpolate">;
|
|
126
128
|
alpha: PD.Numeric;
|
|
127
129
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
128
130
|
material: PD.Group<PD.Normalize<{
|
|
@@ -258,7 +260,7 @@ export declare const ComplexTextureMeshParams: {
|
|
|
258
260
|
flatShaded: PD.BooleanParam;
|
|
259
261
|
ignoreLight: PD.BooleanParam;
|
|
260
262
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
261
|
-
transparentBackfaces: PD.Select<
|
|
263
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
262
264
|
bumpFrequency: PD.Numeric;
|
|
263
265
|
bumpAmplitude: PD.Numeric;
|
|
264
266
|
alpha: PD.Numeric;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2018-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
* @author Gianluca Tomasello <giagitom@gmail.com>
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.ComplexTextureMeshVisual = exports.ComplexTextureMeshParams = exports.ComplexDirectVolumeVisual = exports.ComplexDirectVolumeParams = exports.ComplexTextVisual = exports.ComplexTextParams = exports.ComplexLinesVisual = exports.ComplexLinesParams = exports.ComplexCylindersVisual = exports.ComplexCylindersParams = exports.ComplexSpheresVisual = exports.ComplexSpheresParams = exports.ComplexMeshVisual = exports.ComplexMeshParams = exports.ComplexVisual = void 0;
|
|
@@ -99,7 +100,7 @@ function ComplexVisual(builder, materialId) {
|
|
|
99
100
|
}
|
|
100
101
|
function update(newGeometry) {
|
|
101
102
|
if (updateState.createNew) {
|
|
102
|
-
locationIt = createLocationIterator(newStructure);
|
|
103
|
+
locationIt = createLocationIterator(newStructure, newProps);
|
|
103
104
|
if (newGeometry) {
|
|
104
105
|
renderObject = createComplexRenderObject(newStructure, newGeometry, locationIt, newTheme, newProps, materialId);
|
|
105
106
|
positionIt = createPositionIterator(newGeometry, renderObject.values);
|
|
@@ -114,7 +115,7 @@ function ComplexVisual(builder, materialId) {
|
|
|
114
115
|
}
|
|
115
116
|
if (updateState.updateTransform) {
|
|
116
117
|
// console.log('update transform')
|
|
117
|
-
locationIt = createLocationIterator(newStructure);
|
|
118
|
+
locationIt = createLocationIterator(newStructure, newProps);
|
|
118
119
|
var instanceCount = locationIt.instanceCount, groupCount = locationIt.groupCount;
|
|
119
120
|
if (newProps.instanceGranularity) {
|
|
120
121
|
(0, marker_data_1.createMarkers)(instanceCount, 'instance', renderObject.values);
|
|
@@ -18,7 +18,7 @@ export declare const StructureMeshParams: {
|
|
|
18
18
|
flatShaded: PD.BooleanParam;
|
|
19
19
|
ignoreLight: PD.BooleanParam;
|
|
20
20
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
21
|
-
transparentBackfaces: PD.Select<
|
|
21
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
22
22
|
bumpFrequency: PD.Numeric;
|
|
23
23
|
bumpAmplitude: PD.Numeric;
|
|
24
24
|
alpha: PD.Numeric;
|
|
@@ -46,7 +46,7 @@ export declare const StructureSpheresParams: {
|
|
|
46
46
|
doubleSided: PD.BooleanParam;
|
|
47
47
|
ignoreLight: PD.BooleanParam;
|
|
48
48
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
49
|
-
transparentBackfaces: PD.Select<
|
|
49
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
50
50
|
solidInterior: PD.BooleanParam;
|
|
51
51
|
clipPrimitive: PD.BooleanParam;
|
|
52
52
|
approximate: PD.BooleanParam;
|
|
@@ -79,10 +79,11 @@ export declare const StructureCylindersParams: {
|
|
|
79
79
|
doubleSided: PD.BooleanParam;
|
|
80
80
|
ignoreLight: PD.BooleanParam;
|
|
81
81
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
82
|
-
transparentBackfaces: PD.Select<
|
|
82
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
83
83
|
solidInterior: PD.BooleanParam;
|
|
84
84
|
bumpFrequency: PD.Numeric;
|
|
85
85
|
bumpAmplitude: PD.Numeric;
|
|
86
|
+
colorMode: PD.Select<"default" | "interpolate">;
|
|
86
87
|
alpha: PD.Numeric;
|
|
87
88
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
88
89
|
material: PD.Group<PD.Normalize<{
|
|
@@ -222,7 +223,7 @@ export declare const StructureTextureMeshParams: {
|
|
|
222
223
|
flatShaded: PD.BooleanParam;
|
|
223
224
|
ignoreLight: PD.BooleanParam;
|
|
224
225
|
xrayShaded: PD.Select<boolean | "inverted">;
|
|
225
|
-
transparentBackfaces: PD.Select<
|
|
226
|
+
transparentBackfaces: PD.Select<"on" | "off" | "opaque">;
|
|
226
227
|
bumpFrequency: PD.Numeric;
|
|
227
228
|
bumpAmplitude: PD.Numeric;
|
|
228
229
|
alpha: PD.Numeric;
|