Skip to content

Commit

Permalink
make circle radius larger on mobile only (#11210)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 authored May 2, 2024
1 parent a3267f7 commit 7a5df60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/settings/PolygonDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import type { KonvaEventObject } from "konva/lib/Node";
import Konva from "konva";
import { Vector2d } from "konva/lib/types";
import { isMobileOnly } from "react-device-detect";

type PolygonDrawerProps = {
points: number[][];
Expand Down Expand Up @@ -45,7 +46,7 @@ export default function PolygonDrawer({
handleMouseOverAnyPoint,
handleMouseOutAnyPoint,
}: PolygonDrawerProps) {
const vertexRadius = 6;
const vertexRadius = isMobileOnly ? 12 : 6;
const flattenedPoints = useMemo(() => flattenPoints(points), [points]);
const [stage, setStage] = useState<Konva.Stage>();
const [minMaxX, setMinMaxX] = useState([0, 0]);
Expand Down

0 comments on commit 7a5df60

Please sign in to comment.