0๐
โ
Ok, I found a solution without going through the canvas.
Without going into details, the idea is to get all data and display them, but in opacity 0 and reveal those which must be.
The scroll therefore takes the entire width, then you just have to put the scroll on the main element on initialization.
Thus, when the children are revealed, there is no change in content size, so the scroll does not move.
Accessibility and practicality is better.
Here, I created fake divs to preserve the content size, as I have a need to align the child content. The blue line = the fake content
0๐
When using GoJS, if you set the Diagram.renderer property to "svg", everything the user sees is in SVG DOM.
Source:stackexchange.com