import { Position } from '@turf/turf'; import { PointRender } from '../render'; import { FeatureUpdater, IBaseModeOptions, ILayerMouseEvent, ILngLat, IPointFeature, ISceneMouseEvent } from '../typings'; import { BaseMode } from './base-mode'; export declare abstract class PointMode extends BaseMode { /** * 获取point类型对应的render * @protected */ protected get pointRender(): PointRender | undefined; /** * 获取正在被拖拽的结点 * @protected */ protected get dragPoint(): IPointFeature | undefined; /** * 当前高亮的结点 * @protected */ protected get editPoint(): IPointFeature | undefined; /** * 当前悬停的结点 * @protected */ protected get hoverPoint(): IPointFeature | undefined; getDragPoint(): IPointFeature | undefined; getEditPoint(): IPointFeature | undefined; /** * 获取点数据 */ getPointData(): IPointFeature[]; /** * 设置点数据 * @param data */ setPointData(data: FeatureUpdater): IPointFeature[]; /** * 绑定点Render相关事件 */ bindPointRenderEvent(): void; /** * 创建点Feature * @param position */ handleCreatePoint(position: Position): IPointFeature; handlePointHover(point: IPointFeature): IPointFeature; handlePointUnHover(point: IPointFeature): IPointFeature; handlePointDragStart(point: IPointFeature): IPointFeature; handlePointDragging(point: IPointFeature, lngLat: ILngLat): IPointFeature; handlePointDragEnd(point: IPointFeature): IPointFeature; /** * 创建点回调 * @param e */ onPointCreate(e: ILayerMouseEvent): IPointFeature | undefined; onPointMouseMove(e: ILayerMouseEvent): IPointFeature; onPointMouseOut(e: ILayerMouseEvent): IPointFeature; /** * 开始拖拽点回调 * @param e */ onPointDragStart(e: ILayerMouseEvent): IPointFeature | undefined; /** * 拖拽中点回调 * @param e */ onPointDragging(e: ISceneMouseEvent): IPointFeature | undefined; /** * 拖拽结束点回调 * @param e */ onPointDragEnd(e: ISceneMouseEvent): IPointFeature | undefined; enablePointRenderAction(): void; disablePointRenderAction(): void; }