Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anatomogram

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anatomogram - npm Package Compare versions

Comparing version 1.2.9 to 1.2.10

lib/Assets.js

6

lib/Anatomogram.js

@@ -23,6 +23,4 @@ 'use strict';

var _urijs = require('urijs');
var _Assets = require('./Assets.js');
var _urijs2 = _interopRequireDefault(_urijs);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -178,3 +176,3 @@

_react2.default.createElement(_reactSvg2.default, {
path: (0, _urijs2.default)('svg/' + this.props.filename, this.props.urlToResources).toString(),
path: (0, _Assets.resolveUrlToAnatomogram)(this.props.urlToResources, this.props.filename),
callback: function callback(svgDomNode) {

@@ -181,0 +179,0 @@ _this2._initialiseSvgElements(getSvgElementById(svgDomNode));

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -21,34 +21,32 @@

var _Assets = require('./Assets.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var resolveUrlToIcon = function resolveUrlToIcon(urlToResources, selectedType, anatomogramType) {
return (0, _urijs2.default)('img/' + (selectedType === anatomogramType ? '' : 'un') + 'selected' + anatomogramType + '.png', urlToResources).toString();
};
var Switcher = function Switcher(_ref) {
var anatomogramTypes = _ref.anatomogramTypes,
urlToResources = _ref.urlToResources,
selectedType = _ref.selectedType,
onChangeSelectedType = _ref.onChangeSelectedType;
return anatomogramTypes.length > 1 && _react2.default.createElement(
'div',
{ style: { display: 'inline-block', verticalAlign: 'top', width: '10%', maxWidth: '32px' } },
anatomogramTypes.map(function (anatomogramType) {
return _react2.default.createElement('img', { key: anatomogramType,
className: 'gxa-selection-icon',
onClick: function onClick() {
return onChangeSelectedType(anatomogramType);
},
src: resolveUrlToIcon(urlToResources, selectedType, anatomogramType) });
})
);
var anatomogramTypes = _ref.anatomogramTypes,
urlToResources = _ref.urlToResources,
selectedType = _ref.selectedType,
onChangeSelectedType = _ref.onChangeSelectedType;
return anatomogramTypes.length > 1 && _react2.default.createElement(
'div',
{ style: { display: 'inline-block', verticalAlign: 'top', width: '10%', maxWidth: '32px' } },
anatomogramTypes.map(function (anatomogramType) {
return _react2.default.createElement('img', { key: anatomogramType,
className: 'gxa-selection-icon',
onClick: function onClick() {
return onChangeSelectedType(anatomogramType);
},
src: (0, _Assets.resolveUrlToIcon)(urlToResources, selectedType, anatomogramType) });
})
);
};
Switcher.propTypes = {
anatomogramTypes: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
selectedType: _propTypes2.default.string.isRequired,
onChangeSelectedType: _propTypes2.default.func.isRequired,
urlToResources: _propTypes2.default.string.isRequired
anatomogramTypes: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
selectedType: _propTypes2.default.string.isRequired,
onChangeSelectedType: _propTypes2.default.func.isRequired,
urlToResources: _propTypes2.default.string.isRequired
};
exports.default = Switcher;
{
"name": "anatomogram",
"version": "1.2.9",
"version": "1.2.10",
"description": "Anatomogram component for Expression Atlas heatmap",

@@ -8,3 +8,3 @@ "main": "lib/index.js",

"parseSvgs": "node scripts/svgParse.js src/svg > src/json/svgsMetadata.json ",
"prepublishOnly": "yarn run parseSvgs && rm -rf lib && babel src -d lib --ignore '**/*.less','**/*.sass' --copy-files",
"prepublish": "yarn run parseSvgs && rm -rf lib && babel src -d lib --ignore '**/*.less','**/*.sass' --copy-files",
"dist": "NODE_ENV=production webpack --debug --optimize-minimize --output-pathinfo --display-chunks --display-modules",

@@ -11,0 +11,0 @@ "test": "jest --coverage || echo 'LOL tests failed'",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc