Fix error with grid values being set to infinity and update map grid size verification

This commit is contained in:
Mitchell McCaffrey
2020-10-09 15:14:04 +11:00
parent e92a9acb5a
commit 1043f093cd
2 changed files with 6 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ function MapSettings({
let inset = map.grid.inset;
if (value > 0) {
if (gridX > 0) {
const gridScale =
((inset.bottomRight.x - inset.topLeft.x) * map.width) / gridX;
inset.bottomRight.y = (value * gridScale) / map.height;