anatomogram
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -97,2 +97,6 @@ 'use strict'; | ||
Anatomogram.defaultProps = { | ||
showIds: [], | ||
highlightIds: [], | ||
selectIds: [], | ||
showColour: 'grey', | ||
@@ -99,0 +103,0 @@ highlightColour: 'red', |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13612545
1019
109