Browse Source

Less padding, touch remove, max resolution

master
Joshua Moerman 11 years ago
parent
commit
c32015f5c1
  1. 4
      index.css
  2. 11
      index.js

4
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;
}

11
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 {