mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 10:49:38 +02:00
add actor-man and actor-box classes to text tag
This commit is contained in:
@@ -7,6 +7,8 @@ import { sanitizeUrl } from '@braintree/sanitize-url';
|
|||||||
export const ACTOR_TYPE_WIDTH = 18 * 2;
|
export const ACTOR_TYPE_WIDTH = 18 * 2;
|
||||||
const TOP_ACTOR_CLASS = 'actor-top';
|
const TOP_ACTOR_CLASS = 'actor-top';
|
||||||
const BOTTOM_ACTOR_CLASS = 'actor-bottom';
|
const BOTTOM_ACTOR_CLASS = 'actor-bottom';
|
||||||
|
const ACTOR_BOX_CLASS = 'actor-box';
|
||||||
|
const ACTOR_MAN_FIGURE_CLASS = 'actor-man';
|
||||||
|
|
||||||
export const drawRect = function (elem, rectData) {
|
export const drawRect = function (elem, rectData) {
|
||||||
return svgDrawCommon.drawRect(elem, rectData);
|
return svgDrawCommon.drawRect(elem, rectData);
|
||||||
@@ -352,7 +354,7 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
|
|||||||
rect.y,
|
rect.y,
|
||||||
rect.width,
|
rect.width,
|
||||||
rect.height,
|
rect.height,
|
||||||
{ class: 'actor' },
|
{ class: `actor ${ACTOR_BOX_CLASS}` },
|
||||||
conf
|
conf
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -390,7 +392,7 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
|
|||||||
actor.actorCnt = actorCnt;
|
actor.actorCnt = actorCnt;
|
||||||
}
|
}
|
||||||
const actElem = elem.append('g');
|
const actElem = elem.append('g');
|
||||||
let cssClass = 'actor-man';
|
let cssClass = ACTOR_MAN_FIGURE_CLASS;
|
||||||
if (isFooter) {
|
if (isFooter) {
|
||||||
cssClass += ` ${BOTTOM_ACTOR_CLASS}`;
|
cssClass += ` ${BOTTOM_ACTOR_CLASS}`;
|
||||||
} else {
|
} else {
|
||||||
@@ -453,7 +455,7 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
|
|||||||
rect.y + 35,
|
rect.y + 35,
|
||||||
rect.width,
|
rect.width,
|
||||||
rect.height,
|
rect.height,
|
||||||
{ class: 'actor' },
|
{ class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },
|
||||||
conf
|
conf
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user