Many collapsible/tab widgets hide content using display:none. This can lead to plot dimension issues when the LZ plot is first drawn, because changing display mode doesn't trigger the resize listener on a window.
Use a relatively new (2017) browser API to handle this scenario. This should be performance tested in our own sites (like LocalZoom) so that we can monitor errors before shipping as part of a formal release.
Also moved resize listener to after the plot container/svg is defined, to reduce some spurious item undefined errors. (initializeLayout --> initialize)
TODO:
[x] Performance test; identify if listener is firing too often
[x] Handle older browser (check if api is available)
[~] Add unit tests for size behavior
[~] Implement in LocalZoom and collect error monitoring/reports
Many collapsible/tab widgets hide content using
display:none
. This can lead to plot dimension issues when the LZ plot is first drawn, because changing display mode doesn't trigger the resize listener on a window.Use a relatively new (2017) browser API to handle this scenario. This should be performance tested in our own sites (like LocalZoom) so that we can monitor errors before shipping as part of a formal release.
Also moved resize listener to after the plot container/svg is defined, to reduce some spurious item undefined errors. (initializeLayout --> initialize)
TODO: