Graduate

Update register.html

......@@ -67,7 +67,7 @@ function init()
video.width = video.videoWidth;
video.height = video.videoHeight;
if (video.width > screenWidth || video.height + headerHeight + messageboxHeight > screenHeight){
ratio = Math.min(screenWidth / video.width * 1.0, screenHeight / ((video.height + headerHeight + messageboxHeight) * 1.0));
ratio = Math.min(screenWidth / (video.width * 1.0), screenHeight / ((video.height + headerHeight + messageboxHeight) * 1.0));
}
container.style.width = Math.round(video.width * ratio) + 'px';
container.style.height = Math.round(video.height * ratio) + 'px';
......
......@@ -43,13 +43,13 @@ function init()
video.addEventListener('canplay', () => {
var screenWidth = $(document).width();
var screenHeight = $(document).height();
var contentWidth = $('.w3-content').width();
var contentHeight = $('.w3-content').height();
var headerHeight = $('#header').height();
var inputformHeight = $('#inputForm').height();
var ratio = 1.0;
video.width = video.videoWidth;
video.height = video.videoHeight;
if (video.width > screenWidth || contentHeight > screenHeight){
ratio = Math.min(screenWidth / video.width * 1.0, 1 - (contentHeight - screenheight) / (video.height * 1.0));
if (video.width > screenWidth || headerHeight + video.height + inputformHeight > screenHeight){
ratio = Math.min(screenWidth / (video.width * 1.0), screenHeight / ((headerHeight + video.height + inputformHeight) * 1.0));
}
container.style.width = Math.round(video.width * ratio) + 'px';
container.style.height = Math.round(video.height * ratio) + 'px';
......@@ -244,7 +244,7 @@ function submit()
and is wrapped around the whole page content, except for the footer in this example -->
<div class="w3-content">
<!-- Header -->
<header class="w3-container w3-center">
<header id="header" class="w3-container w3-center">
<h1><b>얼굴 등록</b></h1>
<p>Made by <span class="w3-tag">정해갑</span></p>
</header>
......