Mermaid version 11.2.0-a.10

This commit is contained in:
Knut Sveidqvist
2024-09-18 13:49:50 +02:00
parent faed69c86e
commit 6184510439
3 changed files with 23 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@mermaid-chart/mermaid",
"version": "11.2.0-a.8",
"version": "11.2.0-a.10",
"description": "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",
"type": "module",
"module": "./dist/mermaid.core.mjs",

View File

@@ -348,7 +348,9 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
.attr('class', 'actor-line 200')
.attr('stroke-width', '0.5px')
.attr('stroke', '#999')
.attr('name', actor.name);
.attr('name', actor.name)
.attr('data-et', 'life-line')
.attr('data-id', actor.name);
g = boxplusLineGroup.append('g');
actor.actorCnt = actorCnt;
@@ -390,6 +392,11 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
}
}
if (!isFooter) {
g.attr('data-et', 'participant');
g.attr('data-id', actor.name);
}
_drawTextCandidateFunc(conf, hasKatex(actor.description))(
actor.description,
g,
@@ -430,7 +437,9 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
.attr('class', 'actor-line 200')
.attr('stroke-width', '0.5px')
.attr('stroke', '#999')
.attr('name', actor.name);
.attr('name', actor.name)
.attr('data-et', 'life-line')
.attr('data-id', actor.name);
actor.actorCnt = actorCnt;
}
@@ -444,6 +453,10 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
actElem.attr('class', cssClass);
actElem.attr('name', actor.name);
if (!isFooter) {
actElem.attr('data-et', 'participant').attr('data-id', actor.name);
}
const rect = svgDrawCommon.getNoteRect();
rect.x = actor.x;
rect.y = actorY;
@@ -567,7 +580,7 @@ export const drawActivation = function (elem, bounds, verticalPos, conf, actorAc
* @param {any} conf - Diagram configuration
* @returns {any}
*/
export const drawLoop = async function (elem, loopModel, labelText, conf) {
export const drawLoop = async function (elem, loopModel, labelText, conf, msg) {
const {
boxMargin,
boxTextMargin,
@@ -577,7 +590,10 @@ export const drawLoop = async function (elem, loopModel, labelText, conf) {
messageFontSize: fontSize,
messageFontWeight: fontWeight,
} = conf;
const g = elem.append('g');
const g = elem
.append('g')
.attr('data-et', 'control-structure')
.attr('data-id', 'i' + msg.id);
const drawLoopLine = function (startx, starty, stopx, stopy) {
return g
.append('line')

View File

@@ -188,8 +188,8 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => {
} else {
if (!positions.nodes[node.id]) {
// Simple case
positions.nodes[node.id] = { x: xPos, y: maxY + 20 };
xPos = xPos + 75;
positions.nodes[node.id] = { x: xPos, y: maxY + 120 };
xPos = xPos + 175;
}
}
}