diff --git a/src/components/map/MapToken.js b/src/components/map/MapToken.js index 2025ca9..f94b315 100644 --- a/src/components/map/MapToken.js +++ b/src/components/map/MapToken.js @@ -1,5 +1,5 @@ import React, { useState, useRef } from "react"; -import { Image as KonvaImage, Group, Line, Rect, Circle } from "react-konva"; +import { Image as KonvaImage, Group } from "react-konva"; import { useSpring, animated } from "react-spring/konva"; import useImage from "use-image"; import Konva from "konva"; @@ -18,8 +18,7 @@ import { useDataURL } from "../../contexts/AssetsContext"; import TokenStatus from "../token/TokenStatus"; import TokenLabel from "../token/TokenLabel"; - -import colors from "../../helpers/colors"; +import TokenOutline from "../token/TokenOutline"; import { tokenSources } from "../../tokens"; @@ -235,43 +234,6 @@ function MapToken({ } } - function renderOutline() { - const outline = getScaledOutline(); - const sharedProps = { - fill: colors.black, - opacity: tokenImage ? 0 : 0.8, - }; - if (outline.type === "rect") { - return ( - - ); - } else if (outline.type === "circle") { - return ( - - ); - } else { - return ( - - ); - } - } - return ( - {renderOutline()} +