1 | import { Component, ShapeStyleProps } from '@antv/f-engine';
|
2 | import { ChartChildProps } from '../../chart';
|
3 | type StyleType = (record: any) => ShapeStyleProps;
|
4 | export interface SelectionProps {
|
5 | selection?: {
|
6 | triggerOn?: 'click' | 'press' | string;
|
7 | type?: 'single' | 'multiple';
|
8 | defaultSelected?: any[];
|
9 | selectedStyle?: ShapeStyleProps | StyleType;
|
10 | unSelectedStyle?: ShapeStyleProps | StyleType;
|
11 | cancelable?: boolean;
|
12 | };
|
13 | }
|
14 | export interface SelectionState {
|
15 | selected: any[];
|
16 | }
|
17 | declare class Selection<P extends SelectionProps = SelectionProps, S extends SelectionState = SelectionState> extends Component<P & ChartChildProps, S> {
|
18 | constructor(props: P, context: any);
|
19 | didMount(): void;
|
20 | willReceiveProps(nextProps: P): void;
|
21 | getSnapRecords(_point: any): any;
|
22 | isSelected(record: any): boolean;
|
23 | getSelectionStyle(record: any): ShapeStyleProps;
|
24 | }
|
25 | export default Selection;
|