Переглянути джерело

support for 2 residue motifs

JonStargaryen 4 роки тому
батько
коміт
5e817be97d
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      src/viewer/ui/strucmotif.tsx

+ 3 - 2
src/viewer/ui/strucmotif.tsx

@@ -24,6 +24,7 @@ import {ExchangesControl} from './exchanges';
 // TODO use prod
 // const ADVANCED_SEARCH_URL = 'https://localhost:8080/search?request=';
 const ADVANCED_SEARCH_URL = 'https://strucmotif-dev.rcsb.org/search?request=';
+const MIN_MOTIF_SIZE = 2;
 const MAX_MOTIF_SIZE = 10;
 
 /**
@@ -156,9 +157,9 @@ class SubmitControls extends PurePluginUIComponent<{}, { isBusy: boolean, residu
         return [
             {
                 kind: 'item',
-                label: `Submit Search ${history.length < 3 ? ' (3 selections required)' : ''}`,
+                label: `Submit Search ${history.length < MIN_MOTIF_SIZE ? ' (' + MIN_MOTIF_SIZE + ' selections required)' : ''}`,
                 value: this.submitSearch,
-                disabled: history.length < 3
+                disabled: history.length < MIN_MOTIF_SIZE
             },
         ];
     }