Skip to content

Commit

Permalink
#5232 Enabling handdrawn mode
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Oct 28, 2024
1 parent d790e35 commit 0af0827
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cypress/platform/knsv2.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<style>
body {
/* background: rgb(221, 208, 208); */
background: #333;
/* background: #333; */
font-family: 'Arial';
/* color: white; */
/* font-size: 18px !important; */
Expand Down Expand Up @@ -127,9 +127,10 @@
};
mermaid.initialize({
// theme: 'base',
theme: 'default',
// theme: 'default',
// theme: 'forest',
// handDrawnSeed: 12,
look: 'handDrawn',
// look: 'handDrawn',
// 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX',
// layout: 'dagre',
// layout: 'elk',
Expand Down
1 change: 1 addition & 0 deletions packages/mermaid/src/diagrams/kanban/kanbanDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const getData = function () {
ticket: section.ticket,
shape: 'kanbanSection',
level: section.level,
look: conf.look,
} satisfies KanbanNode;
_nodes.push(node);
const children = nodes.filter((n) => n.parentId === section.id);
Expand Down
2 changes: 2 additions & 0 deletions packages/mermaid/src/diagrams/kanban/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const genSections: DiagramStylesProvider = (options) => {
i - 1
} polygon, .section-${i - 1} path {
fill: ${adjuster(options['cScale' + i], 10)};
stroke: ${adjuster(options['cScale' + i], 10)};
}
.section-${i - 1} text {
fill: ${options['cScaleLabel' + i]};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ const kanbanSection = async (parent, node) => {
fill: clusterBkg,
// fill: 'red',
stroke: clusterBorder,
fillWeight: 3,
fillWeight: 4,
seed: handDrawnSeed,
});
const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, node.rx), options);
Expand Down

0 comments on commit 0af0827

Please sign in to comment.