I got the following problem: I use a bootstrap modal (which has 900px width) to display a goJS canvas. The modal is 900px wide. However, the canvas does not fill up the modal even though I set the width of the canvas root element to 100%:
The canvas that is generated is a little smaller…
…which results in a white bar on the right side of the modal:
Setting the value of the canvas to 900px after it is drawn results in a subtle horizontal stretch, which is not a solution.
Setting the value of the wrapping DIV (#goJSCanvas) to 917 (17px more because thats the width of the white gap) result in an overflow of 17px to the right side of the modal. The canvas then has the perfect width, but the white gap overflows.
I am almost certain that it has to do with a scrollbar but I did not manage to solve this issue yet.
Basically, I want the white space to go away by extending the canvas without stretching it.