Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58cdc1be8d | ||
|
|
4039202268
|
||
|
|
4677cc5229 | ||
|
|
8800724aa9
|
||
|
|
56f3a9b380 | ||
|
|
a0d41c388b | ||
|
|
092cc63148 | ||
|
|
95553296bd | ||
|
|
9330227879 | ||
|
|
faaff33841 | ||
|
|
508a6899d8 | ||
|
|
be0f7b64b8 | ||
|
|
15e3248ee1 | ||
|
|
04a897c958 | ||
|
|
845d77ebda | ||
|
|
d78817180b |
No files matched your search
+1
-1
@@ -8,6 +8,6 @@
|
|||||||
"ws": "^7.4.4"
|
"ws": "^7.4.4"
|
||||||
},
|
},
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"author": "Pőcze Bence <bence@pocze.ch>",
|
"author": "Pőcze Bence and The MapGuesser Contributors <bence@pocze.ch>",
|
||||||
"license": "GNU AGPL 3.0"
|
"license": "GNU AGPL 3.0"
|
||||||
}
|
}
|
||||||
@@ -7,10 +7,6 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jumpForm {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* modify the cursor for the Leaflet map */
|
/* modify the cursor for the Leaflet map */
|
||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
|
|||||||
@@ -323,7 +323,7 @@
|
|||||||
.on('click', function () {
|
.on('click', function () {
|
||||||
MapEditor.select(this);
|
MapEditor.select(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
MapEditor.select(marker);
|
MapEditor.select(marker);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -357,23 +357,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
extractCoordinates: function(coordinatesStr) {
|
extractCoordinates: function (coordinatesStr) {
|
||||||
var coordinates = {valid: false, latlng: {lat: 0., lng: 0.}};
|
var coordinates = { valid: false, latlng: { lat: 0., lng: 0. } };
|
||||||
var delimiters = [',', ' ', ';'];
|
var delimiters = [',', ' ', ';'];
|
||||||
|
|
||||||
coordinatesStr = coordinatesStr.trim();
|
coordinatesStr = coordinatesStr.trim();
|
||||||
if(coordinatesStr.length == 0) {
|
if (coordinatesStr.length == 0) {
|
||||||
return coordinates;
|
return coordinates;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var delimiter of delimiters) {
|
for (var delimiter of delimiters) {
|
||||||
if(coordinatesStr.indexOf(delimiter) != -1) {
|
if (coordinatesStr.indexOf(delimiter) != -1) {
|
||||||
|
|
||||||
var coordinatesArr = coordinatesStr.split(delimiter);
|
var coordinatesArr = coordinatesStr.split(delimiter);
|
||||||
coordinates.latlng.lat = parseFloat(coordinatesArr[0]);
|
coordinates.latlng.lat = parseFloat(coordinatesArr[0]);
|
||||||
coordinates.latlng.lng = parseFloat(coordinatesArr[1]);
|
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;
|
coordinates.valid = true;
|
||||||
return coordinates;
|
return coordinates;
|
||||||
}
|
}
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
var coordinatesStr = document.getElementById("jumpCoordinates").value;
|
var coordinatesStr = document.getElementById("jumpCoordinates").value;
|
||||||
var coordinates = Util.extractCoordinates(coordinatesStr);
|
var coordinates = Util.extractCoordinates(coordinatesStr);
|
||||||
|
|
||||||
if(coordinates.valid) {
|
if (coordinates.valid) {
|
||||||
MapEditor.placeMarker(coordinates.latlng);
|
MapEditor.placeMarker(coordinates.latlng);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -487,10 +487,10 @@
|
|||||||
var coordinates = Util.extractCoordinates(coordinatesStr);
|
var coordinates = Util.extractCoordinates(coordinatesStr);
|
||||||
var jumpButton = document.getElementById("jumpButton");
|
var jumpButton = document.getElementById("jumpButton");
|
||||||
|
|
||||||
if(coordinates.valid) {
|
if (coordinates.valid) {
|
||||||
jumpButton.disabled = false;
|
jumpButton.disabled = false;
|
||||||
|
|
||||||
if(e.key == 'Enter') {
|
if (e.key == 'Enter') {
|
||||||
MapEditor.placeMarker(coordinates.latlng);
|
MapEditor.placeMarker(coordinates.latlng);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ echo "Installing Yarn packages..."
|
|||||||
(cd ${ROOT_DIR}/public/static && yarn install)
|
(cd ${ROOT_DIR}/public/static && yarn install)
|
||||||
|
|
||||||
echo "Installing MapGuesser DB..."
|
echo "Installing MapGuesser DB..."
|
||||||
mysql --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} < ${ROOT_DIR}/db/mapguesser.sql
|
mysql --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} < ${ROOT_DIR}/database/mapguesser.sql
|
||||||
|
|
||||||
echo "Migrating DB..."
|
echo "Migrating DB..."
|
||||||
(cd ${ROOT_DIR} && ./mapg db:migrate)
|
(cd ${ROOT_DIR} && ./mapg db:migrate)
|
||||||
|
|||||||
@@ -92,6 +92,9 @@ class GameController
|
|||||||
'rounds' => [],
|
'rounds' => [],
|
||||||
'currentRound' => -1
|
'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([
|
return new JsonContent([
|
||||||
|
|||||||
@@ -29,6 +29,6 @@
|
|||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<p><span class="bold"><?= $_ENV['APP_NAME'] ?></span> <?= str_replace('Release_', '', VERSION) ?></p><!--
|
<p><span class="bold"><?= $_ENV['APP_NAME'] ?></span> <?= str_replace('Release_', '', VERSION) ?></p><!--
|
||||||
--><p>© Pőcze Bence <?= (new DateTime(REVISION_DATE))->format('Y') ?></p>
|
--><p>© The MapGuesser Contributors <?= (new DateTime(REVISION_DATE))->format('Y') ?></p>
|
||||||
</footer>
|
</footer>
|
||||||
@endsection
|
@endsection
|
||||||
Reference in new issue
Block a user