tidy3d
tidy3d copied to clipboard
fix(): SCEM-5311 - Make Tidy3D plot_3d compatible with script limits
The Tidy3D notebooks environment is about to introduce a number of limits on script content in cell output as a security precaution. This conflicts with the way the plot_3d function operates, which is dependent on the ability to output JavaScript.
This change modifies the injected JavaScript to function whether the script is evaluated inline, or a similar copy is included in the environment. Our notebooks environment will add this script at the same time as introducing the change to strip script output from cells, preserving the ability to render 3d plots.
The script has been included inline, rather than from an external source, to most closely mimic the existing behavior, avoid adding an external script inclusion to customer environments.
Thanks @tim-goddard-flexcompute, looks good to me. I'm just trying to figure out whether to release this as a patch 2.6.4 or whether it can wait a few weeks to release in our 2.7.0. Is it an urgent fix?
Also, just wondering whether this has been tested in eg. a notebook or if that's still needed?
FYI just tested on StartHere.ipynb and works as expected