jellyfin-web/dashboard-ui/cordova/ios/orientation.js

23 lines
487 B
JavaScript
Raw Normal View History

2015-06-04 13:27:46 -07:00
(function () {
function forceScroll() {
var doc = $(document);
// Try to make it react quicker to the orientation change
doc.scrollTop(doc.scrollTop() + 1);
2015-06-29 11:45:42 -07:00
2015-06-29 18:56:25 -07:00
$('paper-tabs').filter(':visible').hide().show();
2015-06-04 13:27:46 -07:00
}
function onOrientationChange() {
forceScroll();
for (var i = 0; i <= 500; i += 100) {
setTimeout(forceScroll, i);
}
}
$(window).on('orientationchange', onOrientationChange);
})();