Move grid to konva folder

This commit is contained in:
Mitchell McCaffrey 2021-08-04 07:00:15 +10:00
parent e22037bd74
commit 518f6b3e5b
3 changed files with 8 additions and 8 deletions

View File

@ -1,19 +1,19 @@
import { Group, Rect } from "react-konva"; import { Group, Rect } from "react-konva";
import useImage from "use-image"; import useImage from "use-image";
import Vector2 from "../helpers/Vector2"; import Vector2 from "../../helpers/Vector2";
import { import {
useGrid, useGrid,
useGridPixelSize, useGridPixelSize,
useGridOffset, useGridOffset,
useGridCellPixelSize, useGridCellPixelSize,
} from "../contexts/GridContext"; } from "../../contexts/GridContext";
import squarePatternDark from "../images/SquarePatternDark.png"; import squarePatternDark from "../../images/SquarePatternDark.png";
import squarePatternLight from "../images/SquarePatternLight.png"; import squarePatternLight from "../../images/SquarePatternLight.png";
import hexPatternDark from "../images/HexPatternDark.png"; import hexPatternDark from "../../images/HexPatternDark.png";
import hexPatternLight from "../images/HexPatternLight.png"; import hexPatternLight from "../../images/HexPatternLight.png";
function Grid({ stroke }: { stroke: "black" | "white" }) { function Grid({ stroke }: { stroke: "black" | "white" }) {
const grid = useGrid(); const grid = useGrid();

View File

@ -7,7 +7,7 @@ import { mapSources as defaultMapSources } from "../../maps";
import { getImageLightness } from "../../helpers/image"; import { getImageLightness } from "../../helpers/image";
import Grid from "../Grid"; import Grid from "../konva/Grid";
import { Map } from "../../types/Map"; import { Map } from "../../types/Map";
function MapGrid({ map }: { map: Map }) { function MapGrid({ map }: { map: Map }) {

View File

@ -18,7 +18,7 @@ import GridOffIcon from "../../icons/GridOffIcon";
import { tokenSources } from "../../tokens"; import { tokenSources } from "../../tokens";
import Grid from "../Grid"; import Grid from "../konva/Grid";
import { Token } from "../../types/Token"; import { Token } from "../../types/Token";
type TokenPreviewProps = { type TokenPreviewProps = {