diff --git a/BlueMapCLI/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java b/BlueMapCLI/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java index 19924ff5..be3db45c 100644 --- a/BlueMapCLI/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java +++ b/BlueMapCLI/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java @@ -181,7 +181,7 @@ public void renderMaps() throws IOException { Collection 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 { diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferAttribute.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferAttribute.java index be07739e..6574db87 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferAttribute.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferAttribute.java @@ -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); } diff --git a/BlueMapCore/src/main/webroot/style/ui/dropdown.scss b/BlueMapCore/src/main/webroot/style/ui/dropdown.scss index e4583bae..2951b8cb 100644 --- a/BlueMapCore/src/main/webroot/style/ui/dropdown.scss +++ b/BlueMapCore/src/main/webroot/style/ui/dropdown.scss @@ -58,7 +58,7 @@ width: 100%; overflow-x: hidden; - max-height: 300px; + max-height: 10rem; overflow-y: auto; z-index: 110; diff --git a/BlueMapCore/src/main/webroot/style/ui/menu.scss b/BlueMapCore/src/main/webroot/style/ui/menu.scss index 29070ba4..43e19836 100644 --- a/BlueMapCore/src/main/webroot/style/ui/menu.scss +++ b/BlueMapCore/src/main/webroot/style/ui/menu.scss @@ -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;