-
Notifications
You must be signed in to change notification settings - Fork 18
/
e-shape-capability.ts
191 lines (152 loc) · 3.27 KB
/
e-shape-capability.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
/* eslint-disable prettier/prettier */
const NONE = 0x0;
const ID = 0x1;
const POSITION = 0x2;
const WIDTH = 0x4;
const HEIGHT = 0x8;
const ROTATION = 0x10;
const SKEW = 0x20;
const REPLACING = 0x40;
const GROUPING = 0x80;
const UNGROUPING = 0x100;
const FILL = 0x200;
const STROKE = 0x400;
const STROKE_SIDE = 0x800;
const BORDER_RADIUS = 0x1000;
const TEXT = 0x2000;
const TEXTURE = 0x4000;
const DATA = 0x8000;
const ACTION = 0x10000;
const CURSOR = 0x20000;
const ORDER_IN_LAYER= 0x40000;
const CHILDREN = 0x80000;
const DATA_MAPPING = 0x100000;
const LINE = 0x200000;
const LINE_TAIL = 0x400000;
const LINE_HEAD = 0x800000;
const COORDINATE = POSITION | WIDTH | HEIGHT | ROTATION | SKEW;
const SHAPE = REPLACING | GROUPING | FILL | STROKE | LINE | LINE_TAIL | LINE_HEAD;
const LAYER = ORDER_IN_LAYER;
const PRIMITIVE = ID | COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
const GROUP = PRIMITIVE | UNGROUPING;
const EMBEDDED = ID | COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;
const EMBEDDED_ACCEPTOR_EDGE = ID | COORDINATE | REPLACING | FILL | STROKE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER;
const CONNECTOR = ID | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
const ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
export const EShapeCapability = {
NONE,
/**
* Allows shape IDs to be modified.
*/
ID,
/**
* Allows shape positions to be modified.
*/
POSITION,
/**
* Allows shape widths to be modified.
*/
WIDTH,
/**
* Allows shape heights to be modified.
*/
HEIGHT,
/**
* Allows shape rotations to be modified.
*/
ROTATION,
/**
* Allows shape skews to be modified.
*/
SKEW,
/** @deprecated */
ALIGN: NONE,
/**
* Allows shapes to be replaced with other shapes.
*/
REPLACING,
/**
* Allows shapes to be grouped.
*/
GROUPING,
/**
* Allows grouped shapes to be ungrouped.
*/
UNGROUPING,
/**
* Allows shape fills to be modified.
*/
FILL,
/**
* Allows shape strokes to be modified.
*/
STROKE,
/**
* Allows shape stroke sides to be modified.
*/
STROKE_SIDE,
/**
* Allows shape border radiuses to be modified.
*/
BORDER_RADIUS,
/**
* Allows shape texts to be modified.
*/
TEXT,
/**
* Allows shape textures to be modified.
*/
TEXTURE,
/** @deprecated in favor of {@link DATA} */
TAG: DATA,
/**
* Allows shape data to be modified.
*/
DATA,
/**
* Allows shape data mapping to be modified.
*/
DATA_MAPPING,
/**
* Allows shape actions to be modified.
*/
ACTION,
/**
* Allows shape cursors to be modified.
*/
CURSOR,
/**
* Allows shape orders in layer to be modified.
*/
ORDER_IN_LAYER,
/**
* Allows shape children to be modified.
*/
CHILDREN,
/**
* Allows shape line to be modified.
*/
LINE,
/**
* Allows shape line tail to be modified.
*/
LINE_TAIL,
/**
* Allows shape line head to be modified.
*/
LINE_HEAD,
COORDINATE,
SHAPE,
LAYER,
PRIMITIVE,
GROUP,
EMBEDDED,
EMBEDDED_ACCEPTOR_EDGE,
CONNECTOR,
ALL
} as const;
export type EShapeCapability = typeof EShapeCapability[keyof typeof EShapeCapability];