diff --git a/index.css b/index.css index 7c163e7..f424887 100644 --- a/index.css +++ b/index.css @@ -38,10 +38,10 @@ h1 { .modalDialog > div { text-align: center; - width: 300px; + width: 280px; position: relative; margin: 40px auto; - padding: 5px 20px 13px 20px; + padding: 5px; border-radius: 10px; background: #fff; } diff --git a/index.js b/index.js index f5b9628..69f8bf1 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,9 @@ var svglines_online = new Array(); var speed = 100; var line_kind = 1; +var maxwidth = 1280; +var maxheight = 1024; + function init() { myName = document.getElementById('loginname').value; var login = document.getElementById('login'); @@ -34,8 +37,8 @@ function init() { function resize(){ var app = document.getElementById('app'); - app.style.width = (window.innerWidth - 8) + 'px'; - app.style.height = (window.innerHeight - 4) + 'px'; + app.style.width = Math.min(window.innerWidth - 8, maxwidth) + 'px'; + app.style.height = Math.min(window.innerHeight - 4, maxheight) + 'px'; updateUser(); } @@ -115,6 +118,10 @@ function updateLines(lines){ console.log('removing: ' + id); removeLine(id); }); + current.addEventListener('touchend', function () { + console.log('removing: ' + id); + removeLine(id); + }); if(lines[i].line_kind == 0){ current.setAttribute('class', "guitar"); } else {