#3561 Adding cScale0-11 etc and usage of the colors from the mindmap diagram

This commit is contained in:
Knut Sveidqvist
2022-10-03 14:51:13 +02:00
parent 05a594a492
commit 8ee321fd7b
11 changed files with 300 additions and 64 deletions

View File

@@ -3,8 +3,8 @@ import { darken, lighten, isDark } from 'khroma';
const genSections = (options) => {
let sections = '';
for (let i = 0; i < 8; i++) {
options['lineColor' + i] = options['lineColor' + i] || options['gitInv' + i];
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];
if (isDark(options['lineColor' + i])) {
options['lineColor' + i] = lighten(options['lineColor' + i], 20);
} else {
@@ -12,25 +12,25 @@ const genSections = (options) => {
}
}
for (let i = 0; i < 8; i++) {
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
const sw = '' + (17 - 3 * i);
sections += `
.section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${
i - 1
} path {
fill: ${options['git' + i]};
fill: ${options['cScale' + i]};
}
.section-${i - 1} text {
fill: ${options['gitBranchLabel' + i]};
fill: ${options['cScaleLabel' + i]};
// fill: ${options['gitInv' + i]};
}
.node-icon-${i - 1} {
font-size: 40px;
color: ${options['gitBranchLabel' + i]};
color: ${options['cScaleLabel' + i]};
// color: ${options['gitInv' + i]};
}
.section-edge-${i - 1}{
stroke: ${options['git' + i]};
stroke: ${options['cScale' + i]};
}
.edge-depth-${i - 1}{
stroke-width: ${sw};