From aa565d98a6fed4479441992a9cacf8d27bc4ed64 Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 15 Nov 2024 12:47:56 +0100 Subject: [PATCH] ux --- index.html.template | 7 +++++-- load.js | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/index.html.template b/index.html.template index 3c6abe7..7f24149 100644 --- a/index.html.template +++ b/index.html.template @@ -10,7 +10,7 @@ width: 64px; image-rendering: pixelated; } - @media screen and (min-width: 1620px) { + @media screen and (min-width: calc(800px + calc(64px * 4))) { body { content: ""; display: table; @@ -22,7 +22,10 @@ } #right { float: right; - width: 50%; + width: calc(100% - 800px - 25px); + position: absolute; + top: 0px; + right: 0px; } } diff --git a/load.js b/load.js index afbad7b..892910c 100644 --- a/load.js +++ b/load.js @@ -115,6 +115,9 @@ window.requestAnimationFrame(first); addEventListener('keydown', (e) => { wasm_function('key_pressed')(e.keyCode); + if(["Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(e.code) > -1) { + e.preventDefault(); + } }); addEventListener('keyup', (e) => {