Graduate

Update index.html UI

......@@ -63,15 +63,16 @@ function init()
var screenHeight = $(document).height();
var headerHeight = $('#header').height();
var messageboxHeight = $('#messagebox').height();
var ratio = 1.0;
video.width = video.videoWidth;
video.height = video.videoHeight;
if (video.width > screenWidth || video.height + headerHeight > screenHeight){
var ratio = Math.min(screenWidth / video.width * 1.0, screenHeight / ((video.height + headerHeight) * 1.0));
ratio = Math.min(screenWidth / video.width * 1.0, screenHeight / ((video.height + headerHeight) * 1.0));
}
container.style.width = Math.round(video.width * ratio) + 'px';
container.style.height = Math.round(video.height * ratio) + 'px';
canvasOutput.width = Math.round(video.width * ratio);
canvasOutput.height = Math.round(video.height * ratio);
}
load_cascade();
});
}).catch(function (err0r) {
......