Fix a bug with saving tiles sometimes and one with the ui

This commit is contained in:
Blue (Lukas Rieger) 2020-03-08 22:02:44 +01:00
parent 33ff579f9b
commit dde30e932d
4 changed files with 12 additions and 9 deletions

View File

@ -181,7 +181,7 @@ public void renderMaps() throws IOException {
Collection<Vector2i> chunks;
if (!forceRender) {
long lastRender = webSettings.getLong(map.getId(), "last-render");
long lastRender = webSettings.getLong("maps", map.getId(), "last-render");
chunks = map.getWorld().getChunkList(lastRender);
} else {
chunks = map.getWorld().getChunkList();
@ -264,7 +264,7 @@ public void renderMaps() throws IOException {
rmstate.delete();
for (MapType map : maps.values()) {
webSettings.set(startTime, map.getId(), "last-render");
webSettings.set(startTime, "maps", map.getId(), "last-render");
}
try {

View File

@ -31,7 +31,6 @@
import java.util.ArrayList;
import java.util.List;
import com.flowpowered.math.GenericMath;
import com.google.common.base.Preconditions;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
@ -78,7 +77,7 @@ public void writeJson(JsonWriter json) throws IOException {
json.name("array").beginArray();
for (int i = 0; i < values.length; i++) {
// rounding and remove ".0" to save string space
double d = GenericMath.round(values[i], 4);
float d = Math.round(values[i] * 10000f) / 10000f;
if (d == (int) d) json.value((int) d);
else json.value(d);
}

View File

@ -58,7 +58,7 @@
width: 100%;
overflow-x: hidden;
max-height: 300px;
max-height: 10rem;
overflow-y: auto;
z-index: 110;

View File

@ -1,8 +1,6 @@
$menu-width: 375px;
.bluemap-container .ui .menu {
position: relative;
height: 100%;
width: $menu-width;
max-width: 100%;
@ -57,7 +55,13 @@ $menu-width: 375px;
> .close-button {
z-index: 20;
left: 0;
right: calc(375px - 2.5rem);
top: 0.5rem;
@media (max-width: $menu-width) {
left: 0.5rem;
top: 0.5rem;
}
}
> .content {
@ -66,7 +70,7 @@ $menu-width: 375px;
top: 3rem;
width: calc(375px - 1rem);
height: calc(100% - 3rem);
height: calc(100% - 4rem);
padding: 0.5rem;