From 9aa521d6666466a99c3c530595525c83486e1cb8 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 15 Mar 2012 19:07:50 -0600 Subject: [PATCH] sticky keys --- track.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/track.js b/track.js index 6a18b42..62f934d 100644 --- a/track.js +++ b/track.js @@ -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);