From af0314af9cecf28364f7bbd5978d752fceef5b45 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 24 Apr 2015 17:15:00 +0200 Subject: [PATCH] Added alert and corrected bug --- static/js/PointerCamera.js | 3 ++- static/js/prototype/main.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/static/js/PointerCamera.js b/static/js/PointerCamera.js index 55cb2ab..e713cf5 100644 --- a/static/js/PointerCamera.js +++ b/static/js/PointerCamera.js @@ -51,7 +51,8 @@ var PointerCamera = function() { 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); - listenerTarget.addEventListener('mouseout', onMouseUp, false); + // listenerTarget.addEventListener('mouseup', function() { console.log("mouseup");}, false); + // listenerTarget.addEventListener('mouseout', onMouseUp, false); this.collisions = true; } diff --git a/static/js/prototype/main.js b/static/js/prototype/main.js index dbeb588..db6f3e8 100644 --- a/static/js/prototype/main.js +++ b/static/js/prototype/main.js @@ -15,6 +15,7 @@ var loader; var container_size = {width: 1024, height: 576}; var prev = {x:0, y:0, go:false}; var showArrows = true; +var beenFullscreen = false; init(); animate(); @@ -221,6 +222,12 @@ function init() { } function fullscreen() { + + if (!beenFullscreen) { + beenFullscreen = true; + alert('To quit fullscren mode, type ESC key'); + } + container.style.position = "absolute"; container.style.cssFloat = "top-left"; container.style.top = "0px";