Releases: geneontology/wc-gocam-viz
v1.0.0
Added
-
New options for data retrieval The
<wc-gocam-viz>
element now accepts anapi-url
attribute. When thegocam-id
attribute is also set, model data will automatically be fetched by replacing%ID
in the value ofapi-url
with the currentgocam-id
value. The defaultapi-url
value ishttps://api.geneontology.org/api/go-cam/%ID
. On the other hand if the host page already has the model data, thegocam-id
attribute can be omitted (which will prevent the automatic data fetch) and the model data can be provided via the newsetModelData()
method.// Assuming `data` has been set by fetching it manually, parsing a file, etc document.getElementById("my-gocam-viz").setModelData(data)
-
Standalone legend element There is now a standalone
<wc-gocam-legend>
element. The legend will still be rendered by the<wc-gocam-viz>
element if theshow-legend
attribute is set to true or omitted. However, for more control over where the legend is rendered, you can set theshow-legend
attribute to false and place a<wc-gocam-legend>
element where needed.
Changed
- Legend image assets Previously when importing the widget as an NPM package, additional configuration was required in a build step to copy legend images from
node_modules/@geneontology/wc-gocam-viz/dist/wc-gocam-viz/assets
into a place where they could be served by the host application. These images are now inlined, and this copy step is not required. - Shadow DOM All custom elements provided by this package are now rendered in Shadow DOM hosts. This provides styling isolation so you don't have to worry about your CSS classes conflicting with the widget's, and vice-versa. Widget style customization is now done via shadow parts and CSS custom properties. This example shows how to apply custom styling to get the pre-1.0.0 default style back.
Removed
repository
attribute Therepository
attribute has been removed. If you need to change where model data is fetched from, use the newapi-url
attribute.- Bootstrap dependency The widget no longer has a dependency on Bootstrap
v1.0.0-beta.1
1.0.0-beta.1