misc: try to follow window resizes to alter pdfjs iframe height
This commit is contained in:
parent
a7c65b8224
commit
acb9173a94
|
@ -27,7 +27,15 @@ $('div.cell h2').on('click', function() {
|
|||
$('div.cell').removeClass('top');
|
||||
$(this).parents('div.cell').addClass('top');
|
||||
});
|
||||
$('iframe').css('height', 'calc( ' + $('.document').height() + 'px - 7em)');
|
||||
|
||||
$(window).on('resize', function() {
|
||||
if ($('.top iframe').length == 1) {
|
||||
$('.top iframe').css('height', 'calc( ' + $('.document').height() + 'px - 7em)');
|
||||
} else {
|
||||
$('iframe').css('height', 'calc( ' + $('.document').height() + 'px - 2em)');
|
||||
}
|
||||
});
|
||||
$(window).trigger('resize');
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue