Showing
2 changed files
with
6 additions
and
6 deletions
| ... | @@ -67,7 +67,7 @@ function init() | ... | @@ -67,7 +67,7 @@ function init() |
| 67 | video.width = video.videoWidth; | 67 | video.width = video.videoWidth; |
| 68 | video.height = video.videoHeight; | 68 | video.height = video.videoHeight; |
| 69 | if (video.width > screenWidth || video.height + headerHeight + messageboxHeight > screenHeight){ | 69 | if (video.width > screenWidth || video.height + headerHeight + messageboxHeight > screenHeight){ |
| 70 | - ratio = Math.min(screenWidth / video.width * 1.0, screenHeight / ((video.height + headerHeight + messageboxHeight) * 1.0)); | 70 | + ratio = Math.min(screenWidth / (video.width * 1.0), screenHeight / ((video.height + headerHeight + messageboxHeight) * 1.0)); |
| 71 | } | 71 | } |
| 72 | container.style.width = Math.round(video.width * ratio) + 'px'; | 72 | container.style.width = Math.round(video.width * ratio) + 'px'; |
| 73 | container.style.height = Math.round(video.height * ratio) + 'px'; | 73 | container.style.height = Math.round(video.height * ratio) + 'px'; | ... | ... |
| ... | @@ -43,13 +43,13 @@ function init() | ... | @@ -43,13 +43,13 @@ function init() |
| 43 | video.addEventListener('canplay', () => { | 43 | video.addEventListener('canplay', () => { |
| 44 | var screenWidth = $(document).width(); | 44 | var screenWidth = $(document).width(); |
| 45 | var screenHeight = $(document).height(); | 45 | var screenHeight = $(document).height(); |
| 46 | - var contentWidth = $('.w3-content').width(); | 46 | + var headerHeight = $('#header').height(); |
| 47 | - var contentHeight = $('.w3-content').height(); | 47 | + var inputformHeight = $('#inputForm').height(); |
| 48 | var ratio = 1.0; | 48 | var ratio = 1.0; |
| 49 | video.width = video.videoWidth; | 49 | video.width = video.videoWidth; |
| 50 | video.height = video.videoHeight; | 50 | video.height = video.videoHeight; |
| 51 | - if (video.width > screenWidth || contentHeight > screenHeight){ | 51 | + if (video.width > screenWidth || headerHeight + video.height + inputformHeight > screenHeight){ |
| 52 | - ratio = Math.min(screenWidth / video.width * 1.0, 1 - (contentHeight - screenheight) / (video.height * 1.0)); | 52 | + ratio = Math.min(screenWidth / (video.width * 1.0), screenHeight / ((headerHeight + video.height + inputformHeight) * 1.0)); |
| 53 | } | 53 | } |
| 54 | container.style.width = Math.round(video.width * ratio) + 'px'; | 54 | container.style.width = Math.round(video.width * ratio) + 'px'; |
| 55 | container.style.height = Math.round(video.height * ratio) + 'px'; | 55 | container.style.height = Math.round(video.height * ratio) + 'px'; |
| ... | @@ -244,7 +244,7 @@ function submit() | ... | @@ -244,7 +244,7 @@ function submit() |
| 244 | and is wrapped around the whole page content, except for the footer in this example --> | 244 | and is wrapped around the whole page content, except for the footer in this example --> |
| 245 | <div class="w3-content"> | 245 | <div class="w3-content"> |
| 246 | <!-- Header --> | 246 | <!-- Header --> |
| 247 | - <header class="w3-container w3-center"> | 247 | + <header id="header" class="w3-container w3-center"> |
| 248 | <h1><b>얼굴 등록</b></h1> | 248 | <h1><b>얼굴 등록</b></h1> |
| 249 | <p>Made by <span class="w3-tag">정해갑</span></p> | 249 | <p>Made by <span class="w3-tag">정해갑</span></p> |
| 250 | </header> | 250 | </header> | ... | ... |
-
Please register or login to post a comment