The problem with the diagrams in different tabs

I use GoJs with Angular. Different diagrams are located on different tabs. Everything is fine with the requestUpdate function in active tab if the window is resized and the diagram picks up the changes. The problem with diagrams on inactive tabs.

For example, I created a demo in which, when resized, a function is called to center the diagram from the top center. To recreate problem, you need to change the size of the browser and then look at the result on the inactive tab. Also in the console I display information about which diagrams this function is called for and it is called for all diagrams.

Demo view -
Demo source - Angular (forked) - StackBlitz

Video with problem -

I don’t think it makes sense to try to do anything based on not-visible DOM elements, which might not have the correct size and position until after they become visible when that “tab” is opened.

So just do the alignment when the “tab” is opened/selected.