brainbrowser
brainbrowser copied to clipboard
Surface Viewer canvas will be 0 x 0 if container is invisible
It's because of window.onresize checking offsetWidth
and offsetHeight
. These will be 0 if the element is invisible.
Possible solutions might be to make the container visible before measuring or to take the max of the container's offset*
and CSS style dimensions.