-
Notifications
You must be signed in to change notification settings - Fork 18
/
d-chart-selection-shape.ts
44 lines (39 loc) · 1.26 KB
/
d-chart-selection-shape.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { IPoint } from "pixi.js";
import { DBase } from "./d-base";
import { DBaseStateSet } from "./d-base-state-set";
import { DChartSelectionStyle } from "./d-chart-selection";
import { DChartSeries } from "./d-chart-series";
import { DChartSeriesContainer } from "./d-chart-series-container";
import { EShape } from "./shape/e-shape";
export type DChartSelectionShapeNewShape = (state: DBaseStateSet) => EShape;
export interface DChartSelectionShapeOptions<CHART extends DBase = DBase> {
enable?: boolean;
shape?: EShape | DChartSelectionShapeNewShape;
style?: DChartSelectionStyle<CHART>;
state?: string;
theme?: string | DThemeChartSelectionShape;
}
export interface DThemeChartSelectionShape {
isEnabled(state: DBaseStateSet): boolean;
newShape(state: DBaseStateSet): EShape;
}
export interface DChartSelectionShape<CHART extends DBase = DBase> {
bind(container: DChartSeriesContainer<CHART>): void;
unbind(): void;
set(
container: DChartSeriesContainer<CHART>,
position: IPoint,
mappedPosition: IPoint,
series: DChartSeries<CHART>
): void;
unset(): void;
update(
container: DChartSeriesContainer<CHART>,
position: IPoint,
mappedPosition: IPoint
): boolean;
}