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

@@ -22,8 +22,8 @@ function MapGrid({ map, gridSize }) {
const mapSource = useDataSource(mapSourceMap, defaultMapSources);
const [mapImage, mapLoadingStatus] = useImage(mapSource);
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 { mapWidth, mapHeight } = useContext(MapInteractionContext);