Skip to content

Commit dde30e9

Browse files
committed
Fix a bug with saving tiles sometimes and one with the ui
1 parent 33ff579 commit dde30e9

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

BlueMapCLI/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void renderMaps() throws IOException {
181181

182182
Collection<Vector2i> chunks;
183183
if (!forceRender) {
184-
long lastRender = webSettings.getLong(map.getId(), "last-render");
184+
long lastRender = webSettings.getLong("maps", map.getId(), "last-render");
185185
chunks = map.getWorld().getChunkList(lastRender);
186186
} else {
187187
chunks = map.getWorld().getChunkList();
@@ -264,7 +264,7 @@ public void renderMaps() throws IOException {
264264
rmstate.delete();
265265

266266
for (MapType map : maps.values()) {
267-
webSettings.set(startTime, map.getId(), "last-render");
267+
webSettings.set(startTime, "maps", map.getId(), "last-render");
268268
}
269269

270270
try {

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferAttribute.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.util.ArrayList;
3232
import java.util.List;
3333

34-
import com.flowpowered.math.GenericMath;
3534
import com.google.common.base.Preconditions;
3635
import com.google.gson.stream.JsonReader;
3736
import com.google.gson.stream.JsonWriter;
@@ -78,7 +77,7 @@ public void writeJson(JsonWriter json) throws IOException {
7877
json.name("array").beginArray();
7978
for (int i = 0; i < values.length; i++) {
8079
// rounding and remove ".0" to save string space
81-
double d = GenericMath.round(values[i], 4);
80+
float d = Math.round(values[i] * 10000f) / 10000f;
8281
if (d == (int) d) json.value((int) d);
8382
else json.value(d);
8483
}

BlueMapCore/src/main/webroot/style/ui/dropdown.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
width: 100%;
5959
overflow-x: hidden;
6060

61-
max-height: 300px;
61+
max-height: 10rem;
6262
overflow-y: auto;
6363

6464
z-index: 110;

BlueMapCore/src/main/webroot/style/ui/menu.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
$menu-width: 375px;
22

33
.bluemap-container .ui .menu {
4-
position: relative;
5-
64
height: 100%;
75
width: $menu-width;
86
max-width: 100%;
@@ -57,7 +55,13 @@ $menu-width: 375px;
5755

5856
> .close-button {
5957
z-index: 20;
60-
left: 0;
58+
right: calc(375px - 2.5rem);
59+
top: 0.5rem;
60+
61+
@media (max-width: $menu-width) {
62+
left: 0.5rem;
63+
top: 0.5rem;
64+
}
6165
}
6266

6367
> .content {
@@ -66,7 +70,7 @@ $menu-width: 375px;
6670
top: 3rem;
6771

6872
width: calc(375px - 1rem);
69-
height: calc(100% - 3rem);
73+
height: calc(100% - 4rem);
7074

7175
padding: 0.5rem;
7276

0 commit comments

Comments
 (0)