mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 18:24:33 +01:00
add const for class name
This commit is contained in:
@@ -5,6 +5,7 @@ import { ZERO_WIDTH_SPACE, parseFontSize } from '../../utils.js';
|
|||||||
import { sanitizeUrl } from '@braintree/sanitize-url';
|
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';
|
||||||
|
|
||||||
export const drawRect = function (elem, rectData) {
|
export const drawRect = function (elem, rectData) {
|
||||||
return svgDrawCommon.drawRect(elem, rectData);
|
return svgDrawCommon.drawRect(elem, rectData);
|
||||||
@@ -357,7 +358,7 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
|
|||||||
rect.fill = '#eaeaea';
|
rect.fill = '#eaeaea';
|
||||||
}
|
}
|
||||||
if (!isFooter) {
|
if (!isFooter) {
|
||||||
cssclass += ' actor-top';
|
cssclass += ` ${TOP_ACTOR_CLASS}`;
|
||||||
}
|
}
|
||||||
rect.x = actor.x;
|
rect.x = actor.x;
|
||||||
rect.y = actorY;
|
rect.y = actorY;
|
||||||
@@ -425,7 +426,7 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
|
|||||||
const actElem = elem.append('g');
|
const actElem = elem.append('g');
|
||||||
let cssClass = 'actor-man';
|
let cssClass = 'actor-man';
|
||||||
if (!isFooter) {
|
if (!isFooter) {
|
||||||
cssClass += ' actor-top';
|
cssClass += ` ${TOP_ACTOR_CLASS}`;
|
||||||
}
|
}
|
||||||
actElem.attr('class', cssClass);
|
actElem.attr('class', cssClass);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user