UNPKG

leaflet-polydraw

Version:

Advanced Leaflet plugin for freehand polygon drawing, with smart merging and powerful editing tools. Compatible with both Leaflet v1.x and v2.x.

16 lines 837 B
import type { Feature, Polygon } from 'geojson'; import type * as L from 'leaflet'; import { DonutDirection } from '../enums'; export type DonutValidity = 'valid-inward' | 'valid-outward' | 'invalid'; export type DonutValidationReason = 'scale-required' | 'nested-inward' | 'nested-outward' | 'direction-restricted' | 'partial-overlap' | 'invalid-rings'; export interface DonutValidationResult { validity: DonutValidity; reason: DonutValidationReason; submitEnabled: boolean; warning: boolean; statusText: string; polygon?: Feature<Polygon>; allowMerge?: boolean; } export declare function validateDonutCandidate(originalOuter: L.LatLngLiteral[], scaledOuter: L.LatLngLiteral[], scaleX: number, scaleY: number, direction?: DonutDirection): DonutValidationResult; //# sourceMappingURL=donut-validation.d.ts.map