refactor(es modules): continue migration

This commit is contained in:
Azgaar 2022-06-25 17:22:30 +03:00
parent bc65e0e207
commit 97f2b213c4
42 changed files with 252 additions and 222 deletions

View file

@ -1,4 +1,4 @@
import {findCell} from "/src/utils/graphUtils";
import {findCell, findGridCell} from "/src/utils/graphUtils";
import {MOBILE} from "/src/constants";
// fit full-screen map if window is resized
@ -305,7 +305,7 @@ function getDepth(f, p) {
}
// get user-friendly (real-world) height value from map data
function getFriendlyHeight([x, y]) {
export function getFriendlyHeight([x, y]) {
const packH = pack.cells.h[findCell(x, y)];
const gridH = grid.cells.h[findGridCell(x, y, grid)];
const h = packH < 20 ? gridH : packH;