brainbrowser icon indicating copy to clipboard operation
brainbrowser copied to clipboard

Surface Viewer canvas will be 0 x 0 if container is invisible

Open tsherif opened this issue 9 years ago • 0 comments

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.

tsherif avatar Oct 16 '14 11:10 tsherif