pull/3617/head
Mitja Bezenšek 2024-04-25 18:14:44 +02:00
rodzic 4c5abe888c
commit 0810f33985
1 zmienionych plików z 2 dodań i 16 usunięć

Wyświetl plik

@ -186,22 +186,8 @@ export class MinimapManager {
const ly = Math.max(0, minY + vpPageBounds.height - py)
const ry = Math.max(0, -(maxY - vpPageBounds.height - py))
const ql = Math.max(0, lx - rx)
const qr = Math.max(0, rx - lx)
const qt = Math.max(0, ly - ry)
const qb = Math.max(0, ry - ly)
if (ql && ql > qr) {
px += ql / 2
} else if (qr) {
px -= qr / 2
}
if (qt && qt > qb) {
py += qt / 2
} else if (qb) {
py -= qb / 2
}
px += (lx - rx) / 2
py += (ly - ry) / 2
px = clamp(px, minX, maxX)
py = clamp(py, minY, maxY)