Fix NanoMap for Tether
BIN
nano/images/tether_nanomap_z1.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
nano/images/tether_nanomap_z10.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
nano/images/tether_nanomap_z13.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
nano/images/tether_nanomap_z14.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
nano/images/tether_nanomap_z2.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
nano/images/tether_nanomap_z3.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
nano/images/tether_nanomap_z4.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
nano/images/tether_nanomap_z5.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
nano/images/tether_nanomap_z6.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
nano/images/tether_nanomap_z7.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
nano/images/tether_nanomap_z8.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
nano/images/tether_nanomap_z9.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -110,8 +110,15 @@ const NanoMapMarker = (props, context) => {
|
||||
tooltip,
|
||||
color,
|
||||
} = props;
|
||||
const rx = -256 * (zoom - 1) + x * (2 * zoom) - 1.5 * zoom - 3;
|
||||
const ry = 512 * zoom - (y * 2 * zoom) + zoom - 1.5;
|
||||
// Please note, the horrifying `3.65714285714` is just the ratio of the
|
||||
// width/height of the minimap *element* (not image)
|
||||
// to the actual turf size of the map
|
||||
const rx = (-256 * (zoom - 1)
|
||||
+ (x * (3.65714285714 * zoom))
|
||||
- 1.5 * zoom - 3);
|
||||
const ry = (512 * zoom
|
||||
- (y * (3.65714285714 * zoom))
|
||||
+ zoom - 1.5);
|
||||
return (
|
||||
<div style={"transform: scale(" + 1 / zoom + ")"}>
|
||||
<Box
|
||||
|
||||
@@ -102,15 +102,17 @@ export const CrewMonitor = (props, context) => {
|
||||
maxValue={8}
|
||||
onChange={(e, value) => setZoom(value)} />
|
||||
Z-Level:
|
||||
{data.map_levels.map(level => (
|
||||
<Button
|
||||
key={level}
|
||||
selected={~~level === ~~config.mapZLevel}
|
||||
content={level}
|
||||
onClick={() => {
|
||||
act("tgui:setZLevel", { "mapZLevel": level });
|
||||
}} />
|
||||
))}
|
||||
{data.map_levels
|
||||
.sort((a, b) => Number(a) - Number(b))
|
||||
.map(level => (
|
||||
<Button
|
||||
key={level}
|
||||
selected={~~level === ~~config.mapZLevel}
|
||||
content={level}
|
||||
onClick={() => {
|
||||
act("tgui:setZLevel", { "mapZLevel": level });
|
||||
}} />
|
||||
))}
|
||||
<NanoMap zoom={mapZoom}>
|
||||
{crew
|
||||
.filter(x =>
|
||||
|
||||