-
Notifications
You must be signed in to change notification settings - Fork 8
/
visualizer-style.ts
52 lines (45 loc) · 991 Bytes
/
visualizer-style.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
45
46
47
48
49
50
51
52
export type FeatureField<T> = T | ((feature: any) => T);
export interface IStroke {
stroke?: string | any;
'stroke-width'?: number | any;
'stroke-opacity'?: number | any;
'stroke-dasharray'?: number | any;
}
export interface IFill {
fill?: string | any;
'fill-opacity'?: number | any;
}
export interface ILabel extends IStroke {
fontSize?: number | any;
fill?: string;
offsetY?: FeatureField<number>; // for first use
text?: FeatureField<string>;
overflow?: boolean;
}
export interface IIcon {
scale: number;
src: string;
anchor?: number[];
rotation?: number;
rotateWithView?: boolean;
}
export interface IVisualizerStyle extends IStroke, IFill {
zIndex?: number;
'marker-color'?: string;
'marker-size'?: MarkerSize;
shadow?: IStroke;
icon?: IIcon | any;
geometry?: any;
circle?: number | any;
label?: ILabel;
}
export enum MarkerSize {
small = 'small',
medium = 'medium',
large = 'large'
}
export enum MarkerSizeDic {
small = 4,
medium = 6,
large = 8
}