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.
49 lines • 1.74 kB
TypeScript
/**
* Renders the transform overlay (bbox, 8 scale handles, rotate handle, pivot) in a dedicated Leaflet pane.
* Delegates drag events to callbacks. Uses Leaflet APIs and works across v1/v2.
*/
import * as L from 'leaflet';
import { type TransformOverlayCallbacks, type PixelBBox, type PixelPoint } from './transform-types';
import type { DonutValidationResult } from './donut-validation';
export declare class TransformOverlay {
private map;
private pane;
private root;
private draggingHandle;
private documentMoveHandler;
private documentUpHandler;
private pointerCaptureTarget;
private activePointerId;
private callbacks;
private rafId;
private mode;
private onCancel?;
private onConfirm?;
private cancelBtn;
private confirmBtn;
private statusLabel;
private currentBBox;
private currentRotation;
private buttonsHidden;
private destroyed;
private donutValidation;
private donutWarningVisible;
private readonly supportsPointerEvents;
constructor(map: L.Map, callbacks: TransformOverlayCallbacks, mode: 'scale' | 'rotate' | 'donut', onCancel?: () => void, onConfirm?: () => void);
destroy(): void;
setDonutValidation(validation: DonutValidationResult, warningVisible?: boolean): void;
update(bbox: PixelBBox, pivot: PixelPoint, rotation?: number): void;
private render;
private cursorForHandle;
private startDrag;
private onDrag;
private endDrag;
private detachDocumentDragHandlers;
private getMouseLayerPoint;
private updateButtonPositions;
private hideButtons;
private showButtons;
private getAccentPalette;
private isConfirmEnabled;
}
//# sourceMappingURL=transform-overlay.d.ts.map