useResizeHandler to accept list of events
So that it can be fired from events other than resize-window? e.g. resize-pane events from https://github.com/plotly/jupyterlab-chart-editor
Hey @nicolaskruchten - was playing around with this today, wanted to get your thoughts on this approach.
If the divId prop exists, I also just attach the resizeHandler to a synthetic event added to the plot div. At that point it's easy to dispatch the div's custom resize event from outside of Plotly - for example by chaining it within another eventhandler (e.g. in conjunction with a ResizeObserver or something).
I'm admittedly not a JS expert by any means, so if this feels hamfisted definitely feel free to say so.
edit: seems to work pretty well:

Hi,
I'm struggling with a similar issue in getting the Plotly graph to resize dynamically, as in the GIF example above. @dougleville Is there any chance you would be able to upload the code you used to do this?
Thanks
hey @lallen-6, check out the gist here, hopefully this helps.
obviously a bandaid due to the use of a patch, read more about patches here