import { Feature } from '@turf/turf'; import { PolygonRender } from '../render'; import { DeepPartial, FeatureUpdater, IAreaOptions, ILayerMouseEvent, ILineFeature, IMidPointFeature, IPointFeature, IPolygonFeature, IPolygonHelperOptions, IPolygonProperties, IRenderType, ISceneMouseEvent, ITextFeature } from '../typings'; import { ILineModeOptions, LineMode } from './line-mode'; export interface IPolygonModeOptions extends ILineModeOptions { areaOptions: false | IAreaOptions; helper: IPolygonHelperOptions | boolean; } export declare abstract class PolygonMode extends LineMode { protected get dragItem(): IPolygonFeature | undefined; protected get editItem(): IPolygonFeature | undefined; /** * 获取polygon类型对应的render * @protected */ protected get polygonRender(): PolygonRender | undefined; /** * 获取正在被拖拽的线 * @protected */ protected get dragPolygon(): IPolygonFeature | undefined; /** * 正在绘制的线 * @protected */ protected get drawPolygon(): IPolygonFeature | undefined; /** * 当前高亮的结点 * @protected */ protected get editPolygon(): IPolygonFeature | undefined; /** * 当前悬停的线 * @protected */ protected get hoverPolygon(): IPolygonFeature | undefined; getDragPolygon(): IPolygonFeature | undefined; getDrawPolygon(): IPolygonFeature | undefined; getEditPolygon(): IPolygonFeature | undefined; getRenderTypes(): IRenderType[]; getData(getOriginData?: boolean): IPolygonFeature[]; getMainLayer(): import("@antv/l7-core").ILayer[]; getDefaultOptions(options: DeepPartial): T; getAreaTexts(polygons: IPolygonFeature[]): ITextFeature[]; getAllTexts(): ITextFeature[]; /** * 获取线数据 */ getPolygonData(): IPolygonFeature[]; /** * 设置线数据 * @param data */ setPolygonData(data: FeatureUpdater): IPolygonFeature[]; handleCreatePolygon(points: IPointFeature[], line: ILineFeature): IPolygonFeature; handlePolygonUnClick(polygon: IPolygonFeature): IPolygonFeature; handlePolygonHover(polygon: IPolygonFeature): IPolygonFeature; handlePolygonUnHover(): void; handlePolygonDragStart(polygon: IPolygonFeature): IPolygonFeature; bindPolygonRenderEvent(): void; syncPolygonNodes(polygon: IPolygonFeature, nodes: IPointFeature[]): IPolygonFeature; setActivePolygon(polygon: IPolygonFeature, properties?: Partial): IPolygonFeature; clearActivePolygon(): void; onLineDragStart(e: ILayerMouseEvent): ILineFeature | undefined; onLineUnClick(e: ILayerMouseEvent): ILineFeature | undefined; onLineDragEnd(e: ISceneMouseEvent): ILineFeature | undefined; onPolygonUnClick(e: ILayerMouseEvent): IPolygonFeature | undefined; onPolygonHover(e: ILayerMouseEvent): IPolygonFeature | undefined; onPolygonUnHover(e: ILayerMouseEvent): void; onPolygonDragStart(e: ILayerMouseEvent): IPolygonFeature | undefined; onMidPointClick(e: ILayerMouseEvent): IPointFeature | undefined; onPointDragEnd(e: ISceneMouseEvent): IPointFeature | undefined; enablePolygonRenderAction(): void; disablePolygonRenderAction(): void; bindEnableEvent(): void; unbindEnableEvent(): void; bindThis(): void; setActiveFeature(target: Feature | string | null | undefined): void; resetFeatures(): void; }