mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-26 04:25:31 +01:00
Fix a bug with saving tiles sometimes and one with the ui
This commit is contained in:
parent
33ff579f9b
commit
dde30e932d
@ -181,7 +181,7 @@ public void renderMaps() throws IOException {
|
|||||||
|
|
||||||
Collection<Vector2i> chunks;
|
Collection<Vector2i> chunks;
|
||||||
if (!forceRender) {
|
if (!forceRender) {
|
||||||
long lastRender = webSettings.getLong(map.getId(), "last-render");
|
long lastRender = webSettings.getLong("maps", map.getId(), "last-render");
|
||||||
chunks = map.getWorld().getChunkList(lastRender);
|
chunks = map.getWorld().getChunkList(lastRender);
|
||||||
} else {
|
} else {
|
||||||
chunks = map.getWorld().getChunkList();
|
chunks = map.getWorld().getChunkList();
|
||||||
@ -264,7 +264,7 @@ public void renderMaps() throws IOException {
|
|||||||
rmstate.delete();
|
rmstate.delete();
|
||||||
|
|
||||||
for (MapType map : maps.values()) {
|
for (MapType map : maps.values()) {
|
||||||
webSettings.set(startTime, map.getId(), "last-render");
|
webSettings.set(startTime, "maps", map.getId(), "last-render");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.flowpowered.math.GenericMath;
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
import com.google.gson.stream.JsonWriter;
|
import com.google.gson.stream.JsonWriter;
|
||||||
@ -78,7 +77,7 @@ public void writeJson(JsonWriter json) throws IOException {
|
|||||||
json.name("array").beginArray();
|
json.name("array").beginArray();
|
||||||
for (int i = 0; i < values.length; i++) {
|
for (int i = 0; i < values.length; i++) {
|
||||||
// rounding and remove ".0" to save string space
|
// 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);
|
if (d == (int) d) json.value((int) d);
|
||||||
else json.value(d);
|
else json.value(d);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
max-height: 300px;
|
max-height: 10rem;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
z-index: 110;
|
z-index: 110;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
$menu-width: 375px;
|
$menu-width: 375px;
|
||||||
|
|
||||||
.bluemap-container .ui .menu {
|
.bluemap-container .ui .menu {
|
||||||
position: relative;
|
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: $menu-width;
|
width: $menu-width;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -57,7 +55,13 @@ $menu-width: 375px;
|
|||||||
|
|
||||||
> .close-button {
|
> .close-button {
|
||||||
z-index: 20;
|
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 {
|
> .content {
|
||||||
@ -66,7 +70,7 @@ $menu-width: 375px;
|
|||||||
top: 3rem;
|
top: 3rem;
|
||||||
|
|
||||||
width: calc(375px - 1rem);
|
width: calc(375px - 1rem);
|
||||||
height: calc(100% - 3rem);
|
height: calc(100% - 4rem);
|
||||||
|
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user