Prevent automatic data fetching when the gocamId prop is not provided to wc-gocam-viz. Previously the request simply would have failed.
Allow a wc-gocam-viz host to pass data directly to it via the new setModelData method.
Fix a race condition in initializing dbxrefs. This didn't really surface when the widget always made a request to get the GO-CAM data because that request generally takes much longer than the network request made while initializing dbxrefs. But when the GO-CAM data is already available and provided by the host page the race condition was much more evident.
Remove old props (show-gene-product, show-activity) which were removed from wc-gocam-viz some time ago from all examples.
The combination of the first two items allows host pages that already have the GO-CAM data available to simple reuse that instead of making a redundant network request. This will be useful for AmiGO in particular. The new demo/dev page src/local-data.html shows an example of how it works.
The linked issue also talks about the possibility of asking the widget for data that it automatically fetched. But the more I thought about it, the less I saw a clear use case for that. With these changes the rule is clear: if the host page wants the data, it should get the data itself and pass the response to the widget in addition to anything else it want to do with the response.
Fixes #19
These changes:
gocamId
prop is not provided towc-gocam-viz
. Previously the request simply would have failed.wc-gocam-viz
host to pass data directly to it via the newsetModelData
method.dbxrefs
. This didn't really surface when the widget always made a request to get the GO-CAM data because that request generally takes much longer than the network request made while initializingdbxrefs
. But when the GO-CAM data is already available and provided by the host page the race condition was much more evident.show-gene-product
,show-activity
) which were removed fromwc-gocam-viz
some time ago from all examples.The combination of the first two items allows host pages that already have the GO-CAM data available to simple reuse that instead of making a redundant network request. This will be useful for AmiGO in particular. The new demo/dev page
src/local-data.html
shows an example of how it works.The linked issue also talks about the possibility of asking the widget for data that it automatically fetched. But the more I thought about it, the less I saw a clear use case for that. With these changes the rule is clear: if the host page wants the data, it should get the data itself and pass the response to the widget in addition to anything else it want to do with the response.