aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/graph/GraphTheme.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/graph/GraphTheme.tsx')
-rw-r--r--subprojects/frontend/src/graph/GraphTheme.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/subprojects/frontend/src/graph/GraphTheme.tsx b/subprojects/frontend/src/graph/GraphTheme.tsx
index 60fd7925..7334f559 100644
--- a/subprojects/frontend/src/graph/GraphTheme.tsx
+++ b/subprojects/frontend/src/graph/GraphTheme.tsx
@@ -37,7 +37,10 @@ function createEdgeColor(
37 }; 37 };
38} 38}
39 39
40function createTypeHashStyles(theme: Theme): CSSObject { 40function createTypeHashStyles(theme: Theme, colorNodes: boolean): CSSObject {
41 if (!colorNodes) {
42 return {};
43 }
41 const result: CSSObject = {}; 44 const result: CSSObject = {};
42 range(theme.palette.highlight.typeHash.length).forEach((i) => { 45 range(theme.palette.highlight.typeHash.length).forEach((i) => {
43 result[`.node-typeHash-${i}`] = { 46 result[`.node-typeHash-${i}`] = {
@@ -51,7 +54,7 @@ function createTypeHashStyles(theme: Theme): CSSObject {
51 54
52export default styled('div', { 55export default styled('div', {
53 name: 'GraphTheme', 56 name: 'GraphTheme',
54})(({ theme }) => ({ 57})<{ colorNodes: boolean }>(({ theme, colorNodes }) => ({
55 '& svg': { 58 '& svg': {
56 userSelect: 'none', 59 userSelect: 'none',
57 '.node': { 60 '.node': {
@@ -86,7 +89,7 @@ export default styled('div', {
86 '.node-exists-UNKNOWN [stroke="black"]': { 89 '.node-exists-UNKNOWN [stroke="black"]': {
87 strokeDasharray: '5 2', 90 strokeDasharray: '5 2',
88 }, 91 },
89 ...createTypeHashStyles(theme), 92 ...createTypeHashStyles(theme, colorNodes),
90 '.edge': { 93 '.edge': {
91 '& text': { 94 '& text': {
92 fontFamily: theme.typography.fontFamily, 95 fontFamily: theme.typography.fontFamily,