-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Bug: Resize on hidden graph divs causes Error #3866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for posting! Here's the problematic block: Lines 84 to 86 in 9340f26
Rejecting the promise when calling plotly.js/src/plot_api/plot_api.js Line 187 in 9340f26
so that graphs with @antoinerg I'd be interesting in hearing your thoughts on this. |
I think that if the element is not visible, we could silently ignore the error. Note that you will also get this error if plots are not removed with cc @etpinard |
Updated comment #3866 (comment) above ⬆️ |
Let's try to squeeze this one in |
@etpinard I guess we have two options here: 1- Ignore all rejected promises gd._responsiveChartHandler = function() { Plots.resize(gd).catch(Lib.noop); }; 2- Do not call resize if div is hidden gd._responsiveChartHandler = function() { if(!isHidden(gd)) Plots.resize(gd); }; |
Discussion: https://community.plot.ly/t/dynamically-change-responsive-layout/23002
Repo sample: https://codesandbox.io/s/9qy1p1k8jy
Error:
The text was updated successfully, but these errors were encountered: