-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathda-config.js
53 lines (53 loc) · 1.87 KB
/
da-config.js
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
const configs = ['color', 'dash', 'dropShadow', 'endLabel', 'endPlug', 'endPlugColor', 'endPlugOutline', 'endPlugOutlineColor', 'endPlugOutlineSize', 'endPlugSize',
'endSocket', 'endSocketGravity', 'gradient', 'hide', 'middleLabel', 'outline', 'outlineColor', 'outlineSize', 'path', 'show', 'size', 'startLabel',
'startPlug', 'startPlugColor', 'startPlugOutlineSize', 'startPlugSize', 'startSocket', 'startPlugOutline', 'startPlugOutlineColor', 'startSocketGravity'];
const stringProp = {
type: 'String'
};
const numberProp = {
type: 'Number'
};
const da = {
config: {
tagName: 'dom-arrow',
propDefaults: {
isC: true,
show: true,
hide: false,
outline: false,
startPlugOutline: false,
endPlugOutline: false,
loadDelay: -1,
},
propInfo: {
connect: stringProp,
to: stringProp,
color: stringProp,
startSocketGravity: stringProp,
endSocketGravity: stringProp,
startPlugColor: stringProp,
endPlugColor: stringProp,
startPlugSize: numberProp,
endPlugSize: numberProp,
outlineColor: stringProp,
outlineSize: numberProp,
startPlugOutlineColor: stringProp,
endPlugOutlineColor: stringProp,
startPlugOutlineSize: numberProp,
endPlugOutlineSize: numberProp,
},
actions: {
doConnect: {
ifAllOf: ['isC', 'connect', 'to'],
ifKeyIn: ['connectAreaAttachment', 'connectPointAttachment', 'toAreaAttachment', 'toPointAttachment', 'loadDelay']
},
doConfig: {
ifAllOf: ['line'],
ifKeyIn: configs,
}
}
}
};
const exp = { da, configs };
console.log(JSON.stringify(exp));
export {};