From 56025471fd01024e50e551addd43158f1c29166d Mon Sep 17 00:00:00 2001 From: Colton Savage Date: Wed, 6 Jul 2016 15:09:40 -0500 Subject: [PATCH] closes #54 - Issue with globe disappearing on window resize --- globe/globe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/globe/globe.js b/globe/globe.js index 806e5697..f54c3a2c 100644 --- a/globe/globe.js +++ b/globe/globe.js @@ -334,9 +334,9 @@ DAT.Globe = function(container, opts) { } function onWindowResize( event ) { - camera.aspect = container.offsetWidth / container.offsetHeight; + camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); - renderer.setSize( container.offsetWidth, container.offsetHeight ); + renderer.setSize( window.innerWidth, window.innerHeight ); } function zoom(delta) {