Closed mrakitin closed 6 years ago
@jourdain do you have any ideas on what is wrong here?
Yes, I've added the polyfill inside tomviz-web to make it work on "old" browsers.
But when inside the notebook, Jupyter already provide the polyfill, so by loading tomviz-web we load that library twice.
To fix it, we should remove it from tomviz-web. But when embedding in web pages that don't already load the polyfill, we should add the polyfill script along with the tomviz-web one.
Remove that line
https://github.com/OpenChemistry/tomvizweb/blob/master/Source/tomviz-viewer.js#L7
Then when doing that https://openchemistry.github.io/tomvizweb/docs/ we should have both scripts
<script type="text/javascript" src="https://unpkg.com/babel-polyfill/dist/polyfill.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/tomvizweb"></script>
Thanks @jourdain for explaining, I will take a look and try to get something pushed when I get a chance.
@mrakitin Sorry for the delay, this issue is now resolved in the latest release of tomvizweb, see screenshot below. Thanks for the excellent instructions for the recreate.
@cjh1, thank you for resolving the issue, this is a really useful fix!
We together with @yxqd are trying to implement tomvizweb visualization in Jupyter notebooks (please see https://github.com/scikit-beam/ipywe). We met a problem when attempting to visualize two objects:
Steps to reproduce:
ipywe.tomvizjs.TomvizJs(url='https://openchemistry.github.io/tomvizweb/data/GeometryContourExploration.tomviz')
one more time.I hope it can be fixed soon. We don't observe problems with vtk.js visualization of multiple objects in different cells (try http://localhost:8000/notebooks/tests/test_vtkjs.ipynb).