Przeglądaj źródła

Issue #966: removed old and simple membrane representation

cycle20 5 miesięcy temu
rodzic
commit
2c7b653e33

+ 0 - 1
src/Tm3DStandaloneApp/TmTrajectoryHierarchyPreset.ts

@@ -62,7 +62,6 @@ export const TmDetRcsbPreset = TrajectoryHierarchyPresetProvider({
         const structureProperties = await builder.insertStructureProperties(structure);
         const representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties, MembraneOrientationPreset, {});
 
-
         (window as any).plugin = plugin;
 
         const result = {

+ 1 - 1
src/Tm3DStandaloneApp/tmdet-viewer/TmViewerStandalone.ts

@@ -47,7 +47,7 @@ export class TmViewerStandalone extends Viewer {
         let tree = this.plugin.state.behaviors.build();
 
 
-        this.plugin.builders.structure.representation.registerPreset(MembraneOrientationPreset);
+        // this.plugin.builders.structure.representation.registerPreset(MembraneOrientationPreset);
         this.plugin.representation.structure.themes.colorThemeRegistry.add(TmDetColorThemeProvider);
         this.plugin.managers.lociLabels.addProvider(TmDetLabelProvider);
 

+ 7 - 7
src/TmFv3DApp/tmdet-extension/behavior.ts

@@ -313,19 +313,19 @@ export const MembraneOrientationPreset = StructureRepresentationPresetProvider({
         const structure  = structureCell?.obj?.data;
         if (!structureCell || !structure) return {};
 
-        if (!MembraneOrientationProvider.get(structure).value) {
-            await plugin.runTask(Task.create(TMDET_MEMBRANE_ORIENTATION, async runtime => {
-                await MembraneOrientationProvider.attach({ runtime, assetManager: plugin.managers.asset }, structure);
-            }));
-        }
+        // if (!MembraneOrientationProvider.get(structure).value) {
+        //     await plugin.runTask(Task.create(TMDET_MEMBRANE_ORIENTATION, async runtime => {
+        //         await MembraneOrientationProvider.attach({ runtime, assetManager: plugin.managers.asset }, structure);
+        //     }));
+        // }
 
-        const membraneOrientation = await tryCreateMembraneOrientation(plugin, structureCell);
+        // const membraneOrientation = await tryCreateMembraneOrientation(plugin, structureCell);
         const colorTheme =  TmDetColorThemeProvider.name as any;
         console.log('MembOriPreset apply params:', params);
         console.log('MembOriPreset ref:', ref);
         const preset = await PresetStructureRepresentations.auto.apply(ref, { ...params, theme: { globalName: colorTheme, focus: { name: colorTheme } } }, plugin);
 
-        return { components: preset.components, representations: { ...preset.representations, membraneOrientation } };
+        return { components: preset.components, representations: { ...preset.representations /*, membraneOrientation */ } };
     }
 });