From aeb5ed9f7efa4ceae526d1a721c265aaebc6fdc5 Mon Sep 17 00:00:00 2001
From: Manuel Herrmann <it@icetruck.de>
Date: Fri, 18 Sep 2015 15:52:32 +0200
Subject: [PATCH] translation fix for ff.. todo for later

---
 registration-system/view/signups/game1/js/camera.js | 5 +++--
 registration-system/view/signups/game1/js/game.js   | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/registration-system/view/signups/game1/js/camera.js b/registration-system/view/signups/game1/js/camera.js
index 35af7de..21b4c62 100644
--- a/registration-system/view/signups/game1/js/camera.js
+++ b/registration-system/view/signups/game1/js/camera.js
@@ -51,8 +51,9 @@ Camera.prototype.updatePosition = function() {
 	var translation = Vec.add(Vec.flipSign(this.translation), Vec.mul(Game.config.size, 0.5)); // move subject to center
 	if(translation[0] > 0) translation[0] = 0;
 	if(translation[1] > 0) translation[1] = 0;
-	if(translation[0] < (Game.config.size[0] - svg.clientWidth))  translation[0] = Game.config.size[0] - svg.clientWidth;
-	if(translation[1] < (Game.config.size[1] - svg.clientHeight)) translation[1] = Game.config.size[1] - svg.clientHeight;
+	// @TODO: rework for firefox
+	//if(translation[0] < (Game.config.size[0] - svg.clientWidth))  translation[0] = Game.config.size[0] - svg.clientWidth;
+	//if(translation[1] < (Game.config.size[1] - svg.clientHeight)) translation[1] = Game.config.size[1] - svg.clientHeight;
 	root.style.left = translation[0]+'px';
 	root.style.top = translation[1]+'px';
 };
diff --git a/registration-system/view/signups/game1/js/game.js b/registration-system/view/signups/game1/js/game.js
index 01bf81f..cab3cf2 100644
--- a/registration-system/view/signups/game1/js/game.js
+++ b/registration-system/view/signups/game1/js/game.js
@@ -77,12 +77,12 @@ Game.prototype.loadMap = function(map) {
 
 
 			// test animation
-			var ship = svg.select("#shipGroup");
+			/*var ship = svg.select("#shipGroup");
 			ship
 				.attr("transform", function(d,i) { return "translate(200,000)"; });
 			ship.transition()
 				.duration(3000)
-				.attr("transform", function(d,i) { return "translate(0,0)"; });
+				.attr("transform", function(d,i) { return "translate(0,0)"; });*/
 			done();
 
 		});
@@ -113,7 +113,7 @@ Game.prototype.loadMap = function(map) {
 
 	function startMainLoop(){
 		Game.mainLoop = setInterval(function() {
-			if (Game.char.loaded) {
+			if (Game.char && Game.char.loaded) {
 				// move player
 				Game.char.physics();
 				Game.char.animate();
-- 
GitLab