fix demo image sample

pull/293/head
Vladimir Mandic 2020-11-01 14:16:47 -05:00
parent 4dc8eaf79a
commit 8b8a01afe0
2 changed files with 3 additions and 1 deletions

View File

@ -238,6 +238,7 @@ async function processImage(input) {
// just initialize everything and call main function
async function detectVideo() {
config.videoOptimized = true;
document.getElementById('samples').style.display = 'none';
document.getElementById('canvas').style.display = 'block';
const video = document.getElementById('video');
@ -257,6 +258,7 @@ async function detectVideo() {
// just initialize everything and call main function
async function detectSampleImages() {
config.videoOptimized = false;
ui.baseFont = ui.baseFontProto.replace(/{size}/, `${1.2 * ui.columns}rem`);
ui.baseLineHeight = ui.baseLineHeightProto * ui.columns;
document.getElementById('canvas').style.display = 'none';

View File

@ -282,7 +282,7 @@ class Menu {
ctx.fillStyle = gradient;
ctx.fillRect(i * width, 0, width - 4, canvas.height);
ctx.fillStyle = theme.background;
ctx.font = `${width / 1.4}px "Segoe UI"`;
ctx.font = `${width / 1.5}px "Segoe UI"`;
ctx.fillText(Math.round(values[i]), i * width + 1, canvas.height - 1, width - 1);
}
}