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.3.3 to 1.3.4

4

lib/Anatomogram.js

@@ -97,2 +97,6 @@ 'use strict';

Anatomogram.defaultProps = {
showIds: [],
highlightIds: [],
selectIds: [],
showColour: 'grey',

@@ -99,0 +103,0 @@ highlightColour: 'red',

2

package.json
{
"name": "anatomogram",
"version": "1.3.3",
"version": "1.3.4",
"description": "Anatomogram component for Expression Atlas heatmap",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -9,3 +9,4 @@ # Expression Atlas Anatomogram

The ontology IDs are sourced from [Uberon](www.uberon.org), [EFO](www.ebi.ac.uk/efo) and [Plant Ontology](www.plantontology.org/).
The ontology IDs are sourced from [Uberon](www.uberon.org), [EFO](www.ebi.ac.uk/efo) and [Plant
Ontology](www.plantontology.org/).

@@ -45,17 +46,17 @@ To install:

| Name | Type | Default value | Description |
|-------------------|----------|:----------------:|----------------------------------------------------------------------|
| species | string | - | |
| showIds | array | - | |
| highlightIds | array | - | |
| selectIds | array | - | |
| showColour | string | grey | |
| highlightColour | string | red | |
| selectColour | string | purple | |
| showOpacity | number | 0.4 | |
| highlightOpacity | number | 0.4 | |
| selectOpacity | number | 0.4 | |
| onMouseOver | function | `() => {}` | Callback invoked when the mouse is hovered on a tissue |
| onMouseOut | function | `() => {}` | Callback invoked when the mouse is hovered off a tissue |
| onClick | function | `() => {}` | Callback invoked when a tissue is clicked |
| Name | Type | Default value | Description |
|------------------|----------|:--------------:|----------------------------------------------------------------------|
| species | string | - | This is the only required attribute of the anatomogram |
| showIds | array | [] | |
| highlightIds | array | [] | |
| selectIds | array | [] | |
| showColour | string | grey | |
| highlightColour | string | red | |
| selectColour | string | purple | |
| showOpacity | number | 0.4 | |
| highlightOpacity | number | 0.4 | |
| selectOpacity | number | 0.4 | |
| onMouseOver | function | `() => {}` | Callback invoked when the mouse is hovered on a tissue |
| onMouseOut | function | `() => {}` | Callback invoked when the mouse is hovered off a tissue |
| onClick | function | `() => {}` | Callback invoked when a tissue is clicked |

@@ -73,2 +74,3 @@ For a list of available species and IDs have a look at

## Building
To use the anatomogram in a browser you need to build and bundle the package:
```

@@ -78,8 +80,23 @@ npm run dist -- --output-public-path <URL>

`<URL>` is the URL (absolute or relative) from which you’ll be serving the anatomogram. This is required so that the
code knows where to look for static assets (i.e. SVGs and PNGs). You can read more about this option in [Webpack’s
documentation site](https://webpack.js.org/configuration/output/#output-publicpath).
`<URL>` is the URL (absolute or relative) from which you’ll be serving the anatomogram. **Remember to append a final
slash!** This is required so that the code knows where to look for static assets (i.e. SVGs and PNGs). You can read more
about this option in [Webpack’s documentation site](https://webpack.js.org/configuration/output/#output-publicpath).
After building, deployment of `anatomogramDemo.bundle.js` is optional, only if you want to host the demo component.
Include the following in your HTML:
```
<script src="<URL>/vendorCommons.bundle.js"></script>
<script src="<URL>/anatomogram.bundle.js"></script>
<script>
anatomogram.render(options, target)
</script>
```
### Building for a particular species
You can take out all the unnecessary SVGs and PNGs and change
[`Anatomogram.defaultProps.species`](https://github.com/gxa/anatomogram/blob/master/src/Anatomogram.js#L56) to any of
the supported species. You can see an example in [the `mouse` branch](https://github.com/gxa/anatomogram/tree/mouse).
## Contribute

@@ -86,0 +103,0 @@

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