mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-19 12:14:07 +01:00
Added new theme user journey diagram specific theme variables
This commit is contained in:
@@ -22,14 +22,15 @@ function drawActorLegend(diagram) {
|
||||
// Draw the actors
|
||||
let yPos = 60;
|
||||
Object.keys(actors).forEach(person => {
|
||||
const colour = actors[person];
|
||||
const colour = actors[person].color;
|
||||
|
||||
const circleData = {
|
||||
cx: 20,
|
||||
cy: yPos,
|
||||
r: 7,
|
||||
fill: colour,
|
||||
stroke: '#000'
|
||||
stroke: '#000',
|
||||
pos: actors[person].position
|
||||
};
|
||||
svgDraw.drawCircle(diagram, circleData);
|
||||
|
||||
@@ -65,7 +66,10 @@ export const draw = function(text, id) {
|
||||
for (let member in actors) delete actors[member];
|
||||
let actorPos = 0;
|
||||
actorNames.forEach(actorName => {
|
||||
actors[actorName] = conf.actorColours[actorPos % conf.actorColours.length];
|
||||
actors[actorName] = {
|
||||
color: conf.actorColours[actorPos % conf.actorColours.length],
|
||||
position: actorPos
|
||||
};
|
||||
actorPos++;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user