Kaynağa Gözat

Mp4Encoder is no custom-structure-control element anymore

this avoids expanding it when assembly-symmetry is expanded as part of its preset
Sebastian Bittrich 3 yıl önce
ebeveyn
işleme
0d2e393030
3 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 2 3
      src/viewer/index.ts
  2. 1 0
      src/viewer/types.ts
  3. 2 0
      src/viewer/ui/controls.tsx

+ 2 - 3
src/viewer/index.ts

@@ -34,7 +34,6 @@ import { encodeStructureData, downloadAsZipFile } from './helpers/export';
 import { ViewerMethods } from './helpers/viewer';
 import { StructureRef } from 'molstar/lib/mol-plugin-state/manager/structure/hierarchy-state';
 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)
 };
@@ -169,7 +167,8 @@ export class Viewer {
                 superposition: true,
                 component: false,
                 volume: true,
-                custom: true
+                custom: true,
+                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}/>
         </>;
     }
 }