diff --git a/prototype/index.md b/prototype/index.md index 0fcaf5b..7058782 100644 --- a/prototype/index.md +++ b/prototype/index.md @@ -35,4 +35,4 @@ button. -
+ diff --git a/static/js/PointerCamera.js b/static/js/PointerCamera.js index e713cf5..eb80d8e 100644 --- a/static/js/PointerCamera.js +++ b/static/js/PointerCamera.js @@ -46,8 +46,8 @@ var PointerCamera = function() { var onMouseMove = function(event) {self.onMouseMove(event); }; var onMouseUp = function(event) {self.onMouseUp(event); }; - document.addEventListener('keydown', onKeyDown, false); - document.addEventListener('keyup', onKeyUp, false); + listenerTarget.addEventListener('keydown', onKeyDown, false); + listenerTarget.addEventListener('keyup', onKeyUp, false); listenerTarget.addEventListener('mousedown', function(event) { if (event.which == 1) onMouseDown(event);}, false); listenerTarget.addEventListener('mousemove', function(event) { if (event.which == 1) onMouseMove(event);}, false); listenerTarget.addEventListener('mouseup', onMouseUp, false);