-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathattributes.js
66 lines (64 loc) · 2.12 KB
/
attributes.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
54
55
56
57
58
59
60
61
62
63
64
65
66
'use strict';
exports.dash = {
valType: 'string',
// string type usually doesn't take values... this one should really be
// a special type or at least a special coercion function, from the GUI
// you only get these values but elsewhere the user can supply a list of
// dash lengths in px, and it will be honored
values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'],
dflt: 'solid',
editType: 'style',
description: [
'Sets the dash style of lines. Set to a dash type string',
'(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)',
'or a dash length list in px (eg *5px,10px,2px,2px*).'
].join(' ')
};
exports.pattern = {
shape: {
valType: 'enumerated',
values: ['', '/', '\\', 'x', '-', '|', '+', '.'],
dflt: '',
arrayOk: true,
editType: 'style',
description: [
'Sets the shape of the pattern fill.',
'By default, no pattern is used for filling the area.',
].join(' ')
},
bgcolor: {
valType: 'color',
arrayOk: true,
editType: 'style',
description: [
'Sets the background color of the pattern fill.',
'Defaults to a transparent background.',
].join(' ')
},
size: {
valType: 'number',
min: 0,
dflt: 8,
arrayOk: true,
editType: 'style',
description: [
'Sets the size of unit squares of the pattern fill in pixels,',
'which corresponds to the interval of repetition of the pattern.',
].join(' ')
},
solidity: {
valType: 'number',
min: 0,
max: 1,
dflt: 0.3,
arrayOk: true,
editType: 'style',
description: [
'Sets the solidity of the pattern fill.',
'Solidity is roughly proportional to the ratio of the area filled by the pattern.',
'Solidity of 0 shows only the background color without pattern',
'and solidty of 1 shows only the foreground color without pattern.',
].join(' ')
},
editType: 'style'
};