anatomogram
Advanced tools
Comparing version 1.4.5 to 1.5.0
@@ -71,6 +71,9 @@ 'use strict'; | ||
_react2.default.createElement(_Switcher2.default, { | ||
atlasUrl: this.props.atlasUrl, | ||
species: this.props.species, | ||
selectedView: this.state.selectedView, | ||
onChangeView: this._switchAnatomogramView }), | ||
_react2.default.createElement(_AnatomogramSvg2.default, _extends({}, this.props, { | ||
_react2.default.createElement(_AnatomogramSvg2.default, _extends({ | ||
atlasUrl: this.props.atlasUrl | ||
}, this.props, { | ||
selectedView: this.state.selectedView })) | ||
@@ -77,0 +80,0 @@ ); |
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _urijs = require('urijs'); | ||
var _urijs2 = _interopRequireDefault(_urijs); | ||
require('./AnatomogramSvg.css'); | ||
@@ -112,3 +116,3 @@ | ||
_react2.default.createElement(_reactSvg2.default, { | ||
path: loadSvg(props.species, props.selectedView), | ||
path: (0, _urijs2.default)(loadSvg(props.species, props.selectedView), undefined.props.atlasUrl), | ||
callback: function callback(svgDomNode) { | ||
@@ -123,2 +127,3 @@ initialiseSvgElements(getSvgElementById(svgDomNode), props); | ||
AnatomogramSvg.propTypes = { | ||
atlasUrl: _propTypes2.default.string.isRequired, | ||
species: _propTypes2.default.string.isRequired, | ||
@@ -125,0 +130,0 @@ selectedView: _propTypes2.default.string, |
@@ -93,2 +93,3 @@ 'use strict'; | ||
var definePropTypes = (0, _recompose.setPropTypes)({ | ||
atlasUrl: _propTypes2.default.string.isRequired, | ||
species: _propTypes2.default.string.isRequired, | ||
@@ -105,2 +106,6 @@ idsWithMarkup: _propTypes2.default.arrayOf(_propTypes2.default.shape({ | ||
exports.default = (0, _recompose.compose)(addColoringScheme, _recompose.onlyUpdateForPropTypes, definePropTypes, addDefaultCallbacks, normaliseSpecies)(_Anatomogram2.default); | ||
var defineDefaultProps = (0, _recompose.defaultProps)({ | ||
atlasUrl: 'https://www.ebi.ac.uk/gxa/' | ||
}); | ||
exports.default = (0, _recompose.compose)(addColoringScheme, _recompose.onlyUpdateForPropTypes, definePropTypes, defineDefaultProps, addDefaultCallbacks, normaliseSpecies)(_Anatomogram2.default); |
@@ -15,2 +15,6 @@ 'use strict'; | ||
var _urijs = require('urijs'); | ||
var _urijs2 = _interopRequireDefault(_urijs); | ||
var _Assets = require('./Assets'); | ||
@@ -37,3 +41,3 @@ | ||
}, | ||
src: loadIcon(view, selectedView) }); | ||
src: (0, _urijs2.default)(loadIcon(view, selectedView), undefined.props.atlasUrl).toString() }); | ||
}) | ||
@@ -44,2 +48,3 @@ ); | ||
Switcher.propTypes = { | ||
atlasUrl: _propTypes2.default.string.isRequired, | ||
species: _propTypes2.default.string.isRequired, | ||
@@ -46,0 +51,0 @@ selectedView: _propTypes2.default.string, |
{ | ||
"name": "anatomogram", | ||
"version": "1.4.5", | ||
"version": "1.5.0", | ||
"description": "Anatomogram component for Expression Atlas heatmap", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
13615112
1076