Hi there,
what is the best way to detect if the panel size has changed? I couldn’t find a event to trigger resizing the panel content. I don’t really like to call resize() on the graph (Plot.ly) on each render or refresh event.
Well… maybe I have to ask in a bit different way: What are the guidelines on resizing panels? This should be done on every render or / and also on every refresh event?
In the next major of version, we are switching out the dashboard grid and there will be an an event emitted called panel-size-changed which you can listen to. (Doesn’t really help you now though).
Hi Daniel
Thank you very much for the detailed hints! Luckily row is inherited by the panel controller class, so it was easy to add a listener like this:
But then I realized that “span-changed” is not consistently emitted. Only when the panel is dragged. But not when the size changes for another reason, as it occurs when switching to fullscreen or edit mode.
I ended up checking the size in each render() call, and if it has changed, I call the resize mechanism of the embedded graph element. This seems to be the most reliable solution for now.