Added new theme user journey diagram specific theme variables

This commit is contained in:
Ashish Jain
2021-06-15 14:21:25 +02:00
parent 890512ccbb
commit 8b55b83256
3 changed files with 33 additions and 6 deletions

View File

@@ -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++;
});