gramene-search 1.2.91 → 1.2.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@ class TaxDist extends React.Component {
31
31
  })
32
32
  }
33
33
  else {
34
- selectedTaxa = this.props.grameneGenomes.active;
34
+ selectedTaxa = this.props.grameneGenomes.active
35
35
  }
36
36
  return (
37
37
  <div className="results-vis big-vis">
@@ -0,0 +1,6 @@
1
+ .accordion-button {
2
+ padding:0.4rem!important;
3
+ }
4
+ .accordion-button:hover {
5
+ background-color: #dbe8f3;
6
+ }
@@ -1,13 +1,21 @@
1
1
  .gramene-sidebar {
2
2
  position: fixed;
3
- background-color: dimgray;
3
+ background-color: #557b74;
4
+ padding-left: 8px;
5
+ padding-right: 8px;
6
+ padding-bottom: 8px;
7
+ max-width: 16.67%;
8
+ }
9
+ .sorghumbase-sidebar {
10
+ position: fixed;
11
+ background-color: #a03e34;
4
12
  padding-left: 8px;
5
13
  padding-right: 8px;
6
14
  padding-bottom: 8px;
7
15
  max-width: 16.67%;
8
16
  }
9
17
  .gramene-filter-container {
10
- background-color: #cfb5e6;
18
+ background-color: #9bbf6d;
11
19
  padding-left: 4px;
12
20
  padding-bottom: 4px;
13
21
  }
@@ -55,8 +63,21 @@
55
63
  background-color: #feff96;
56
64
  }
57
65
 
66
+ .gramene-view-header {
67
+ width: 100%;
68
+ display: flex;
69
+ flex-wrap: nowrap;
70
+ justify-content: space-evenly;
71
+ font-size: larger;
72
+ font-weight: bold;
73
+ background-color: #fff3a96e;
74
+ border-top: solid;
75
+ border-top-color: #557b74;
76
+ color: #a03e34;
77
+ }
78
+
58
79
  .gramene-view-container {
59
- background-color: lightblue;
80
+ background-color: #fff3a9;
60
81
  padding-left: 4px;
61
82
  padding-right: 4px;
62
83
  padding-bottom: 4px;
@@ -67,6 +88,18 @@
67
88
  margin-bottom: 0;
68
89
  background-color: white;
69
90
  }
91
+ .gramene-view-span-on {
92
+ padding-left: 5px;
93
+ cursor: pointer;
94
+ vertical-align: text-bottom;
95
+ color: #a03e34;
96
+ }
97
+ .gramene-view-span-off {
98
+ padding-left: 5px;
99
+ /*cursor: pointer;*/
100
+ vertical-align: text-bottom;
101
+ color: darkgray;
102
+ }
70
103
  .gramene-view li {
71
104
  display: block;
72
105
  cursor: pointer;
package/src/demo.js CHANGED
@@ -135,6 +135,10 @@ const panSites = [
135
135
  29760020: 1
136
136
  }
137
137
  },
138
+ hideGenomes: {
139
+ 3702:'arabidopsis',
140
+ 4558:'sorghum'
141
+ },
138
142
  targetTaxonId: 29760020,
139
143
  alertText: 'Grapevine site',
140
144
  panSite : {
@@ -214,10 +218,10 @@ const GeneSearchUI = (store) => (
214
218
  </div>
215
219
  </Provider>
216
220
  );
217
- const SearchViews = props => (
221
+ const SearchViewsCmp = props => (
218
222
  <div className="row no-margin no-padding">
219
223
  <div className="col-md-2 no-padding">
220
- <div className="gramene-sidebar">
224
+ <div className={props.id === 'sorghum' ? 'sorghumbase-sidebar' : 'gramene-sidebar'}>
221
225
  <Status/>
222
226
  <Filters/>
223
227
  <Views/>
@@ -228,6 +232,10 @@ const SearchViews = props => (
228
232
  </div>
229
233
  </div>
230
234
  );
235
+ const SearchViews = connect(
236
+ 'selectConfiguration',
237
+ SearchViewsCmp
238
+ );
231
239
 
232
240
  const handleKey = (e, props) => {
233
241
  if (e.key === "Escape") {
@@ -423,7 +431,22 @@ cache.getAll().then(initialData => {
423
431
  const store = getStore(initialData);
424
432
  const config = store.selectConfiguration();
425
433
  ReactGA.initialize(config.ga);
426
-
434
+ if (initialData.hasOwnProperty('grameneMaps')) {
435
+ // check for hidden genomes
436
+ let notHidden = {};
437
+ let haveHidden = false;
438
+ Object.values(initialData.grameneMaps.data).forEach(m => {
439
+ if (m.hidden) {
440
+ haveHidden=true;
441
+ }
442
+ else {
443
+ notHidden[m.taxon_id]=true;
444
+ }
445
+ })
446
+ if (haveHidden) {
447
+ store.doInitializeGrameneGenomes(notHidden)
448
+ }
449
+ }
427
450
  let element = document.getElementById('demo');
428
451
  element && render(demo(store), element);
429
452