import * as React from "react"; import { MapTransformProps } from "../interfaces"; import { transformXY } from "../util"; import { DrawnWeedPayl } from "../../interfaces"; export interface DrawnWeedProps { mapTransformProps: MapTransformProps; data: DrawnWeedPayl | undefined; } export function DrawnWeed(props: DrawnWeedProps) { const ID = "current-weed"; const { data, mapTransformProps } = props; if (!data) { return ; } const { cx, cy, r } = data; const color = data.color || "red"; const { qx, qy } = transformXY(cx, cy, mapTransformProps); const stopOpacity = ["gray", "pink", "orange"].includes(color) ? 0.5 : 0.25; return ; }