Compare commits

...
Author SHA1 Message Date
balazs 56f3a9b380 Merge pull request 'Stuck scoring at zero fixed by regular map area update in session' (#24) from bugfix/scoring-stuck-at-zero into develop
default-pipeline default-pipeline #124
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/24
Reviewed-by: Pőcze Bence <bence@pocze.ch>
2021-04-27 20:36:41 +02:00
balazs a0d41c388b Merge branch 'develop' into bugfix/scoring-stuck-at-zero
default-pipeline default-pipeline #123
2021-04-27 17:56:52 +02:00
balazs 092cc63148 Merge pull request 'jump to coordinate feature added to the header stripe' (#25) from feature/jump-to-specific-coordinates-in-mapeditor into develop
default-pipeline default-pipeline #122
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/25
Reviewed-by: Pőcze Bence <bence@pocze.ch>
2021-04-27 17:56:35 +02:00
balazs 95553296bd removed extra line break
default-pipeline default-pipeline #121
2021-04-27 17:54:47 +02:00
balazs 9330227879 Merge branch 'feature/jump-to-specific-coordinates-in-mapeditor' of gitea.e5tv.hu:esoko/mapguesser into feature/jump-to-specific-coordinates-in-mapeditor
default-pipeline default-pipeline #120
2021-04-27 17:50:10 +02:00
balazs faaff33841 removed #jumpForm and reformatted the code 2021-04-27 17:48:45 +02:00
balazs 508a6899d8 Merge branch 'develop' into bugfix/scoring-stuck-at-zero
default-pipeline default-pipeline #119
2021-04-27 17:36:18 +02:00
balazs be0f7b64b8 refactored comment
default-pipeline default-pipeline #118
2021-04-27 17:35:06 +02:00
balazs 845d77ebda area of map is updated in the session at each game preparation to avoid outdated map area and wrong score calculation
default-pipeline default-pipeline #115
2021-04-27 16:46:40 +02:00
3 changed files with 12 additions and 13 deletions

No files matched your search

-4
View File
@@ -7,10 +7,6 @@
z-index: 1;
}
#jumpForm {
display: inline;
}
/* modify the cursor for the Leaflet map */
.leaflet-container {
cursor: crosshair;
+9 -9
View File
@@ -357,23 +357,23 @@
}
},
extractCoordinates: function(coordinatesStr) {
var coordinates = {valid: false, latlng: {lat: 0., lng: 0.}};
extractCoordinates: function (coordinatesStr) {
var coordinates = { valid: false, latlng: { lat: 0., lng: 0. } };
var delimiters = [',', ' ', ';'];
coordinatesStr = coordinatesStr.trim();
if(coordinatesStr.length == 0) {
if (coordinatesStr.length == 0) {
return coordinates;
}
for(var delimiter of delimiters) {
if(coordinatesStr.indexOf(delimiter) != -1) {
for (var delimiter of delimiters) {
if (coordinatesStr.indexOf(delimiter) != -1) {
var coordinatesArr = coordinatesStr.split(delimiter);
coordinates.latlng.lat = parseFloat(coordinatesArr[0]);
coordinates.latlng.lng = parseFloat(coordinatesArr[1]);
if( !isNaN(coordinates.latlng.lat) && !isNaN(coordinates.latlng.lng) ) {
if (!isNaN(coordinates.latlng.lat) && !isNaN(coordinates.latlng.lng)) {
coordinates.valid = true;
return coordinates;
}
@@ -477,7 +477,7 @@
var coordinatesStr = document.getElementById("jumpCoordinates").value;
var coordinates = Util.extractCoordinates(coordinatesStr);
if(coordinates.valid) {
if (coordinates.valid) {
MapEditor.placeMarker(coordinates.latlng);
}
};
@@ -487,10 +487,10 @@
var coordinates = Util.extractCoordinates(coordinatesStr);
var jumpButton = document.getElementById("jumpButton");
if(coordinates.valid) {
if (coordinates.valid) {
jumpButton.disabled = false;
if(e.key == 'Enter') {
if (e.key == 'Enter') {
MapEditor.placeMarker(coordinates.latlng);
}
}
+3
View File
@@ -92,6 +92,9 @@ class GameController
'rounds' => [],
'currentRound' => -1
]);
} else { // update the area of the map in the session in any case
$state['area'] = $map->getArea();
$session->set('state', $state);
}
return new JsonContent([