e-ucm/rage-analytics-frontend

View on GitHub
app/public/js/iresizer.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict';

jQuery(function ($) {
    var lastHeight = 0, curHeight = 0;
    setInterval(function () {
        $('iframe').each(function() {
            curHeight = $(this).contents().find('.app-wrapper-panel').height();
            if (curHeight !== lastHeight) {
                $(this).css('height', (lastHeight = curHeight) + 'px');
            }
        });
    }, 1000);
});