Skip to content

Commit

Permalink
Add visual viewport and orientation change triggers for resize checks…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Sep 9, 2019
1 parent 060311f commit 10e2885
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/Sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ define( function( require ) {

// Fit to the window and render the initial scene
$( window ).resize( function() { sim.resizeToWindow(); } );
window.addEventListener( 'orientationchange', function() { sim.resizeToWindow(); } );
window.visualViewport && window.visualViewport.addEventListener( 'resize', function() { sim.resizeToWindow(); } );
sim.resizeToWindow();

// Kick off checking for updates, if that is enabled
Expand Down

0 comments on commit 10e2885

Please sign in to comment.