Skip to content

Commit d007bf7

Browse files
Orientation rotate issue in mobile #872
1 parent b5c2ee8 commit d007bf7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/render-google.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,14 @@ var __visualizer_chart_images = [];
428428
}, 500 );
429429
}
430430

431-
$( window ).on( 'orientationchange', function( event ) {
432-
$( '.visualizer-chart-loaded' ).removeClass( 'visualizer-chart-loaded' );
433-
} );
431+
window.onorientationchange = function() {
432+
jQuery( '.visualizer-chart-loaded' ).removeClass( 'visualizer-chart-loaded' );
433+
resizeHiddenContainers(true);
434+
}
434435
});
435436

436437
$(window).on('load', function(){
438+
jQuery( '.visualizer-chart-loaded' ).removeClass( 'visualizer-chart-loaded' );
437439
resizeHiddenContainers(true);
438440
});
439441

0 commit comments

Comments
 (0)