sticky keys

This commit is contained in:
Neale Pickett 2012-03-15 19:07:50 -06:00
parent b85d0774ca
commit 9aa521d666
1 changed files with 4 additions and 3 deletions

View File

@ -67,6 +67,7 @@ function player(color, pos) {
var l = document.getElementById("link");
var positions = [];
debug('up');
for (var i = 0; i < players.length; i += 1) {
positions.push(players[i].pos);
}
@ -74,14 +75,14 @@ function player(color, pos) {
l.href = "#" + JSON.stringify(positions);
window.onmousemove = null;
window.onmouseup = null;
window.onclick = null;
}
function mouseDown() {
window.onmousemove = mouseMove;
window.onmouseup = mouseUp;
e.onclick = mouseUp;
}
e.onmousedown = mouseDown;
e.onclick = mouseDown;
players.push(e);
body.appendChild(e);