Add hex support for default inset function

This commit is contained in:
Mitchell McCaffrey
2021-02-05 11:00:31 +11:00
parent e90b6dea49
commit 5dfddd6af9
5 changed files with 87 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
import Dexie from "dexie";
import blobToBuffer from "./helpers/blobToBuffer";
import { getMapDefaultInset } from "./helpers/grid";
import { getGridDefaultInset } from "./helpers/grid";
import { convertOldActionsToShapes } from "./actions";
function loadVersions(db) {
@@ -219,11 +219,10 @@ function loadVersions(db) {
map.group = "";
map.grid = {
size: { x: map.gridX, y: map.gridY },
inset: getMapDefaultInset(
inset: getGridDefaultInset(
{ size: { x: map.gridX, y: map.gridY }, type: "square" },
map.width,
map.height,
map.gridX,
map.gridY
map.height
),
type: "square",
};