fix: Do the centering after the screenshot is shown

- otherwise it returns 0 as the width
pull/1857/head
Iglocska 2017-01-19 10:21:22 +01:00
parent de754d1062
commit 8011583f67
1 changed files with 1 additions and 1 deletions

View File

@ -45,9 +45,9 @@ function screenshotPopup(screenshotData, title) {
popupHtml = '<img src="' + screenshotData + '" id="screenshot-image" title="' + title + '" />';
popupHtml += '<div class="close-icon useCursorPointer" onClick="closeScreenshot();"></div>';
$('#screenshot_box').html(popupHtml);
$('#screenshot_box').show();
left = ($(window).width() / 2) - ($('#screenshot-image').width() / 2);
$('#screenshot_box').css({'left': left + 'px'});
$('#screenshot_box').show();
$("#gray_out").fadeIn();
}