Browse Source

Merge branch 'master' into dev-sb-v2

# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
#	src/viewer/helpers/preset.ts
Sebastian Bittrich 3 năm trước cách đây
mục cha
commit
5a91993040
5 tập tin đã thay đổi với 12 bổ sung4 xóa
  1. 5 0
      CHANGELOG.md
  2. 1 1
      src/viewer/helpers/preset.ts
  3. 3 3
      src/viewer/index.ts
  4. 1 0
      src/viewer/types.ts
  5. 2 0
      src/viewer/ui/controls.tsx

+ 5 - 0
CHANGELOG.md

@@ -18,6 +18,11 @@
   - The loading configuration includes an optional trajectory preset provider `TrajectoryHierarchyPresetProvider`
 - Remove `alignMotif` methods (& pecos-integration) as the strucmotif service now reports RMSD and transformations for all hits
 
+## [1.9.1] - 2021-10-14
+### Bug fixes
+- More robust 'chain-mode' check in feature preset
+- Don't expand MP4 export controls as part of the symmetry preset
+
 ## [1.9.0] - 2021-09-29
 ### Added
 - Integrate PDBe/AlphaFold confidence coloring theme

+ 1 - 1
src/viewer/helpers/preset.ts

@@ -259,7 +259,7 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
         if ((p.kind === 'feature' || p.kind === 'feature-density') && structure?.obj) {
             let loci = targetToLoci(p.target, structure!.obj.data);
             // if target is only defined by chain: then don't force first residue
-            const chainMode = p.target.labelAsymId && !p.target.authSeqId && !p.target.labelSeqId && !p.target.labelCompId;
+            const chainMode = Object.keys(p.target).length === 1 && !!p.target.labelAsymId;
             // HELP-16678: check for rare case where ligand is not present in requested assembly
             if (loci.elements.length === 0 && !!p.assemblyId) {
                 // switch to Model (a.k.a. show coordinates independent of assembly)

+ 3 - 3
src/viewer/index.ts

@@ -33,7 +33,6 @@ import { encodeStructureData, downloadAsZipFile } from './helpers/export';
 import { setFocusFromRange, removeComponent, clearSelection, createComponent, select } from './helpers/viewer';
 import { SelectBase, SelectRange, SelectTarget, Target } from './helpers/selection';
 import { StructureRepresentationRegistry } from 'molstar/lib/mol-repr/structure/registry';
-import { Mp4Export } from 'molstar/lib/extensions/mp4-export';
 import { DefaultPluginUISpec, PluginUISpec } from 'molstar/lib/mol-plugin-ui/spec';
 import { PluginUIContext } from 'molstar/lib/mol-plugin-ui/context';
 import { ANVILMembraneOrientation, MembraneOrientationPreset } from 'molstar/lib/extensions/anvil/behavior';
@@ -54,7 +53,6 @@ export const BUILD_DATE = new Date(BUILD_TIMESTAMP);
 const Extensions = {
     'rcsb-assembly-symmetry': PluginSpec.Behavior(RCSBAssemblySymmetry),
     'rcsb-validation-report': PluginSpec.Behavior(RCSBValidationReport),
-    'mp4-export': PluginSpec.Behavior(Mp4Export),
     'anvil-membrane-orientation': PluginSpec.Behavior(ANVILMembraneOrientation),
     'af-confidence': PluginSpec.Behavior(AlphaFoldConfidenceScore)
 };
@@ -166,7 +164,9 @@ export class Viewer {
                 superposition: true,
                 component: false,
                 volume: true,
-                custom: true
+                custom: true,
+                // this must be set to true as the Mp4Controls depends on the canvas which will be undefined at init() time
+                mp4export: true
             }),
             detachedFromSierra: o.detachedFromSierra
         };

+ 1 - 0
src/viewer/types.ts

@@ -40,6 +40,7 @@ export type CollapsedState = {
     component: boolean
     volume: boolean
     custom: boolean
+    mp4export: boolean
 }
 
 export interface ViewerState {

+ 2 - 0
src/viewer/ui/controls.tsx

@@ -16,6 +16,7 @@ import { StructureComponentControls } from 'molstar/lib/mol-plugin-ui/structure/
 import { VolumeStreamingControls } from 'molstar/lib/mol-plugin-ui/structure/volume';
 import { SessionControls } from './session';
 import { StrucmotifSubmitControls } from './strucmotif';
+import { Mp4EncoderUI } from 'molstar/lib/extensions/mp4-export/ui';
 
 export class StructureTools extends PluginUIComponent {
     get customState() {
@@ -36,6 +37,7 @@ export class StructureTools extends PluginUIComponent {
             <StructureComponentControls initiallyCollapsed={collapsed.component} />
             <VolumeStreamingControls header='Density' initiallyCollapsed={collapsed.volume} />
             <CustomStructureControls initiallyCollapsed={collapsed.custom} />
+            <Mp4EncoderUI initiallyCollapsed={collapsed.mp4export}/>
         </>;
     }
 }