Browse Source

membrane orientation UI without any checks

JonStargaryen 4 years ago
parent
commit
55cc389e54
1 changed files with 2 additions and 19 deletions
  1. 2 19
      src/viewer/ui/membrane.tsx

+ 2 - 19
src/viewer/ui/membrane.tsx

@@ -76,24 +76,9 @@ export class MembraneOrientationControls extends CollapsableControls<{}, Membran
         return <ApplyActionControl state={pivot.cell.parent} action={EnableMembraneOrientation} initiallyCollapsed={true} nodeRef={pivot.cell.transform.ref} simpleApply={{ header: 'Enable', icon: CheckSvg }} />;
     }
 
-    renderNoMembraneProtein() {
-        // TODO allow to 'force' calculation?
-        return <div className='msp-row-text'>
-            <div>Not registered as Membrane Protein</div>
-        </div>;
-    }
-
-    renderError() {
-        return <div className='msp-row-text'>
-            // TODO report errors
-        </div>;
-    }
-
     get params() {
         const structure = this.pivot.cell.obj?.data;
-        const params = PD.clone(structure ? MembraneOrientationProvider.getParams(structure) : MembraneOrientationProvider.defaultParams);
-        // TODO more?
-        return params;
+        return PD.clone(structure ? MembraneOrientationProvider.getParams(structure) : MembraneOrientationProvider.defaultParams);
     }
 
     get values() {
@@ -125,7 +110,7 @@ export class MembraneOrientationControls extends CollapsableControls<{}, Membran
 
         for (const components of this.plugin.managers.structure.hierarchy.currentComponentGroups) {
             tryCreateMembraneOrientation(this.plugin, s.cell);
-            await this.plugin.managers.structure.component.updateRepresentationsTheme(components, { color: 'default' });
+            await this.plugin.managers.structure.component.updateRepresentationsTheme(components, {});
         }
     }
 
@@ -155,8 +140,6 @@ export class MembraneOrientationControls extends CollapsableControls<{}, Membran
 
     renderControls() {
         if (!this.pivot) return null;
-        if (this.noMembraneProtein) return this.renderNoMembraneProtein();
-        if (!this.noMembraneProtein && this.state.error) return this.renderError();
         if (this.enable) return this.renderEnable();
         return this.renderParams();
     }