jellyfin-web/dashboard-ui/cordova/ios/orientation.js
Luke Pulverenti cc0fd844c3 fix icons
2015-06-29 21:56:25 -04:00

23 lines
487 B
JavaScript

(function () {
function forceScroll() {
var doc = $(document);
// Try to make it react quicker to the orientation change
doc.scrollTop(doc.scrollTop() + 1);
$('paper-tabs').filter(':visible').hide().show();
}
function onOrientationChange() {
forceScroll();
for (var i = 0; i <= 500; i += 100) {
setTimeout(forceScroll, i);
}
}
$(window).on('orientationchange', onOrientationChange);
})();