gramene-search 1.2.28 → 1.2.31

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramene-search",
3
- "version": "1.2.28",
3
+ "version": "1.2.31",
4
4
  "description": "search wrapper for gramene",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
2
  import {connect} from "redux-bundler-react";
3
3
 
4
- const PREFIX = (global.location ? global.location.origin + global.location.pathname : '');
4
+ const PREFIX = (global.location ? global.location.origin + global.location.pathname + '/' : '');
5
5
 
6
6
  const Detail = props => {
7
7
  const gene = props.geneDocs[props.searchResult.id];
8
- const url = `${PREFIX}static/atlasWidget.html?${gene.taxon_id === 112509 ? gene.synonyms[0] : gene._id}`;
8
+ const url = `/static/atlasWidget.html?${gene.taxon_id === 112509 ? gene.synonyms[0] : gene._id}`;
9
9
  const height = '500px';
10
10
  return (
11
11
  <iframe src={url} frameBorder="0" width="100%" height={height}>
@@ -152,7 +152,7 @@ class Location extends React.Component {
152
152
 
153
153
  links() {
154
154
  function jgiify(id) {
155
- return id.replace('SORBI_3','Sobic.');
155
+ return id.replace('SORBI_3','Sobic.').replace(/\.v[0-9]\.[0-9]$/,'');
156
156
  }
157
157
  var gene = this.gene;
158
158
  let links = [
@@ -7,8 +7,7 @@ import isEqual from "lodash/isEqual";
7
7
  // const ensemblREST = 'https://data.gramene.org/pansite-ensembl';
8
8
 
9
9
  // calculate this once.
10
- const PREFIX = (global.location ? global.location.origin + global.location.pathname : '')
11
- + 'static/gramene-dalliance/';
10
+ const PREFIX = '/static/gramene-dalliance/';
12
11
 
13
12
  export default class DallianceBrowser extends React.Component {
14
13