@fleet-frontend/mower-maps
Version:
a mower maps in google maps
20 lines • 707 B
TypeScript
import React from 'react';
export type Vec2 = {
x: number;
y: number;
};
export interface UsePolygonDrawingOptions {
createMode?: boolean;
}
export interface UsePolygonDrawingResult {
points: Vec2[];
completed: boolean;
mousePos: Vec2 | null;
onSvgClick: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
onSvgMouseMove: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
onPointClick: (index: number, e?: React.MouseEvent) => void;
reset: () => void;
updatePoints: (newPoints: Vec2[]) => void;
}
export declare function usePolygonDrawing(options?: UsePolygonDrawingOptions): UsePolygonDrawingResult;
//# sourceMappingURL=usePolygonDrawing.d.ts.map