diff --git a/src/@components/Timeline/index.tsx b/src/@components/Timeline/index.tsx index dd98383..bb12ab3 100644 --- a/src/@components/Timeline/index.tsx +++ b/src/@components/Timeline/index.tsx @@ -5,7 +5,7 @@ import Konva from "konva"; import { useTimelineContext } from "../../@contexts/Timeline"; import { logDebug } from "../../@utils/logger"; import { RESOURCE_HEADER_WIDTH } from "../../@utils/resources"; -import GridLayer from "../GridLayer"; +import GridLayer from "../../grid/Layer"; import ResourcesLayer from "../ResourcesLayer"; import TasksLayer from "../TasksLayer"; diff --git a/src/@components/GridLayer/index.tsx b/src/grid/Layer/index.tsx similarity index 96% rename from src/@components/GridLayer/index.tsx rename to src/grid/Layer/index.tsx index 605073f..82773b9 100644 --- a/src/@components/GridLayer/index.tsx +++ b/src/grid/Layer/index.tsx @@ -1,8 +1,8 @@ import React, { FC, useCallback, useMemo } from "react"; +import { KonvaGroup, KonvaLayer, KonvaLine, KonvaRect, KonvaText } from "../../@components/@konva"; import { useTimelineContext } from "../../@contexts/Timeline"; import { displayInterval } from "../../@utils/time-resolution"; -import { KonvaGroup, KonvaLayer, KonvaLine, KonvaRect, KonvaText } from "../@konva"; interface GridLayerProps { columnWidth: number; @@ -82,7 +82,7 @@ const GridLayer: FC = ({ columnWidth, height, width }) => { {timeBlocks.map((column, index) => { const xPos = columnWidth * index; - if (xPos < drawRange.start * -2 || xPos > drawRange.end * 2) { + if (xPos < drawRange.start * -1.05 || xPos > drawRange.end * 1.05) { return null; }