1 | import { Control, IControlOption, PositionType, Scene } from '@antv/l7';
|
2 | import './css/draw.less';
|
3 | import { DrawFeature } from './modes';
|
4 | import { IDrawFeatureOption } from './modes/draw_feature';
|
5 | export interface IControls {
|
6 | [key: string]: boolean | Partial<IDrawFeatureOption>;
|
7 | }
|
8 | export interface IDrawControlOption extends IControlOption {
|
9 | pickBuffer: number;
|
10 | controls: IControls;
|
11 | layout: 'horizontal' | 'vertical';
|
12 | style: any;
|
13 | }
|
14 | export declare class DrawControl extends Control {
|
15 | private draw;
|
16 | private currentDraw;
|
17 | private scene;
|
18 | constructor(scene: Scene, options: Partial<IDrawControlOption>);
|
19 | getDefault(): {
|
20 | position: PositionType;
|
21 | controls: {
|
22 | point: boolean;
|
23 | line: boolean;
|
24 | polygon: boolean;
|
25 | rect: boolean;
|
26 | circle: boolean;
|
27 | delete: boolean;
|
28 | };
|
29 | name: string;
|
30 | };
|
31 | onAdd(): HTMLElement;
|
32 | onRemove(): void;
|
33 | getDraw(type: string): DrawFeature | null;
|
34 | getAllData(): {
|
35 | [key: string]: any;
|
36 | };
|
37 | removeAllData(): void;
|
38 | private addControls;
|
39 | private addControlEvent;
|
40 | private createButton;
|
41 | private onButtonClick;
|
42 | private onDeleteMode;
|
43 | private onModeChange;
|
44 | }
|