Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Feb 26, 2020
2 parents 33f0b2d + 5b49176 commit a0fa622
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions label_studio/templates/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ <h3>Output Completion Preview</h3>

<script>
var confirm_already_shown = false;
var iframeTimer = null;

// process create request
function process_request(result) {
Expand Down Expand Up @@ -287,10 +288,10 @@ <h3>Output Completion Preview</h3>
iframe.show();
// set height for iframe
let obj = document.getElementById('render-editor');
obj.style.width = "100%";

// wait until all images and resources from iframe loading
setTimeout(function() {
clearTimeout(iframeTimer);
iframeTimer = setTimeout(function() {
obj.style.height = (obj.contentWindow.document.body.scrollHeight + 30) + 'px';
}, 1000);

Expand Down

0 comments on commit a0fa622

Please sign in to comment.