in src/main/resources/static/find-owners.js [616:652]
function popupWindow(reviewerList) {
setupReviewersMap(reviewerList);
var elems = prepareElements();
if (useContextPopup) {
context.popup(context.div.apply(this, elems));
} else {
while (pageDiv.firstChild) {
pageDiv.removeChild(pageDiv.firstChild);
}
elems.forEach(function(e) {
pageDiv.appendChild(e);
});
pageDiv.className = LARGE_PAGE_STYLE;
// Calculate required height, limited to 85% of window height,
// and required width, limited to 75% of window width.
var maxHeight = Math.round(window.innerHeight * 0.85);
var maxWidth = Math.round(window.innerWidth * 0.75);
pageDiv.style.top = '5%';
pageDiv.style.height = 'auto';
pageDiv.style.left = '10%';
pageDiv.style.width = 'auto';
var rect = pageDiv.getBoundingClientRect();
if (rect.width > maxWidth) {
pageDiv.style.width = maxWidth + 'px';
rect = pageDiv.getBoundingClientRect();
}
pageDiv.style.left =
Math.round((window.innerWidth - rect.width) / 2) + 'px';
if (rect.height > maxHeight) {
pageDiv.style.height = maxHeight + 'px';
rect = pageDiv.getBoundingClientRect();
}
pageDiv.style.top =
Math.round((window.innerHeight - rect.height) / 2) + 'px';
pageDiv.style.visibility = 'visible';
}
}