-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTheme.js
32 lines (31 loc) · 881 Bytes
/
Theme.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
const defaultTheme = {
fontSize: 14,
borderStyle: 1, // 0: none, 1: all, 2: only right side of linum box
border: "solid 1px #9a9a9a",
color: "black",
linumColor: "#9a9a9a",
stripe: true,
stripeColor: ["#ffffff", "#f2f2f2"],
linePadding: "5px 5px",
annotationLinePadding: "0px 3px",
labelFontSize: "0.6em",
labelColor: "black",
labelPadding: "0px 1px",
labelBorder: "solid 1px gray",
markColor: "#ffe4e1",
characterPadding: 0,
relationColor: "black",
relationLabelFontSize: "12px",
relationLabelPadding: "0px 0px",
relationLabelBorder: "solid 1px gray",
relationLabelColor: "black",
relationLabelBgColor: "white",
relationLabelBorderRadius: "0px"
};
export function assignTheme(theme) {
var result = JSON.parse(JSON.stringify(defaultTheme));
Object.keys(theme).forEach(key => {
result[key] = theme[key];
});
return result;
}