Added grid scale and offset to maps and refactored into grid object

This commit is contained in:
Mitchell McCaffrey
2020-10-02 15:19:10 +10:00
parent 54a60d6c76
commit 539f216cfe
9 changed files with 46 additions and 22 deletions

View File

@@ -40,8 +40,8 @@ function Map({
}) {
const { tokensById } = useContext(TokenDataContext);
const gridX = map && map.gridX;
const gridY = map && map.gridY;
const gridX = map && map.grid.size.x;
const gridY = map && map.grid.size.y;
const gridSizeNormalized = {
x: gridX ? 1 / gridX : 0,
y: gridY ? 1 / gridY : 0,