mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-31 00:18:55 +01:00
make circle radius larger on mobile only (#11210)
This commit is contained in:
parent
a3267f7d44
commit
7a5df6045a
@ -9,6 +9,7 @@ import {
|
|||||||
import type { KonvaEventObject } from "konva/lib/Node";
|
import type { KonvaEventObject } from "konva/lib/Node";
|
||||||
import Konva from "konva";
|
import Konva from "konva";
|
||||||
import { Vector2d } from "konva/lib/types";
|
import { Vector2d } from "konva/lib/types";
|
||||||
|
import { isMobileOnly } from "react-device-detect";
|
||||||
|
|
||||||
type PolygonDrawerProps = {
|
type PolygonDrawerProps = {
|
||||||
points: number[][];
|
points: number[][];
|
||||||
@ -45,7 +46,7 @@ export default function PolygonDrawer({
|
|||||||
handleMouseOverAnyPoint,
|
handleMouseOverAnyPoint,
|
||||||
handleMouseOutAnyPoint,
|
handleMouseOutAnyPoint,
|
||||||
}: PolygonDrawerProps) {
|
}: PolygonDrawerProps) {
|
||||||
const vertexRadius = 6;
|
const vertexRadius = isMobileOnly ? 12 : 6;
|
||||||
const flattenedPoints = useMemo(() => flattenPoints(points), [points]);
|
const flattenedPoints = useMemo(() => flattenPoints(points), [points]);
|
||||||
const [stage, setStage] = useState<Konva.Stage>();
|
const [stage, setStage] = useState<Konva.Stage>();
|
||||||
const [minMaxX, setMinMaxX] = useState([0, 0]);
|
const [minMaxX, setMinMaxX] = useState([0, 0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user