From 466f065718779955a2532f413a5aa44597bec80c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=91cze=20Bence?=
Date: Sun, 14 Jun 2020 02:06:27 +0200
Subject: [PATCH 1/6] MAPG-125 switch off diff calculation in Modify for better
performance (not sure if needed - we probably won't log)
---
src/Database/Query/Modify.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Database/Query/Modify.php b/src/Database/Query/Modify.php
index f731461..5554409 100755
--- a/src/Database/Query/Modify.php
+++ b/src/Database/Query/Modify.php
@@ -116,11 +116,14 @@ class Modify
private function update(): void
{
- $diff = $this->generateDiff();
+ /*$diff = $this->generateDiff();
if (count($diff) === 0) {
return;
- }
+ }*/
+
+ $diff = $this->attributes;
+ unset($diff[$this->idName]);
$set = $this->generateColumnsWithBinding(array_keys($diff));
From f8bb7bd0924bf7b5ee474a2cf806274f4f1707c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=91cze=20Bence?=
Date: Sun, 14 Jun 2020 02:07:20 +0200
Subject: [PATCH 2/6] MAPG-125 rename #cover to #guessCover in game
---
public/static/css/game.css | 2 +-
public/static/js/game.js | 8 ++++----
views/game.php | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/public/static/css/game.css b/public/static/css/game.css
index 28f2d7d..4081aa9 100644
--- a/public/static/css/game.css
+++ b/public/static/css/game.css
@@ -4,7 +4,7 @@
z-index: 1;
}
-#cover {
+#guessCover {
position: absolute;
top: 40px;
left: 0;
diff --git a/public/static/js/game.js b/public/static/js/game.js
index baac16b..8a835c0 100644
--- a/public/static/js/game.js
+++ b/public/static/js/game.js
@@ -16,7 +16,7 @@
initialize: function () {
document.getElementById('loading').style.visibility = 'visible';
- document.getElementById('cover').style.visibility = 'visible';
+ document.getElementById('guessCover').style.visibility = 'visible';
document.getElementById('currentRound').innerHTML = '1/' + String(Game.NUMBER_OF_ROUNDS);
document.getElementById('currentScoreSum').innerHTML = '0/0';
@@ -27,7 +27,7 @@
MapGuesser.httpRequest('GET', '/game/' + mapId + '/newPlace.json', function () {
document.getElementById('loading').style.visibility = 'hidden';
- document.getElementById('cover').style.visibility = 'hidden';
+ document.getElementById('guessCover').style.visibility = 'hidden';
if (this.response.error) {
//TODO: handle this error
@@ -98,7 +98,7 @@
lastRound.line.setVisible(false);
}
- document.getElementById('cover').style.visibility = 'hidden';
+ document.getElementById('guessCover').style.visibility = 'hidden';
document.getElementById('showGuessButton').style.visibility = null;
document.getElementById('guess').style.visibility = null;
document.getElementById('guess').classList.remove('result')
@@ -152,7 +152,7 @@
document.getElementById('guess').classList.remove('adapt');
}
document.getElementById('loading').style.visibility = 'visible';
- document.getElementById('cover').style.visibility = 'visible';
+ document.getElementById('guessCover').style.visibility = 'visible';
var data = new FormData();
data.append('lat', String(guessPosition.lat));
diff --git a/views/game.php b/views/game.php
index 6760866..ef1ef19 100644
--- a/views/game.php
+++ b/views/game.php
@@ -23,7 +23,7 @@ $jsFiles = [
-
+
-